Commit f84300c4 by Zack Weinberg Committed by Zack Weinberg

stdbool.h: Make the typedef name _Bool, with bool a #defined alias.

1999-08-29 08:38 -0700  Zack Weinberg  <zack@bitmover.com>

	* stdbool.h: Make the typedef name _Bool, with bool a #defined
	alias.

From-SVN: r28972
parent c648f99c
1999-08-29 08:38 -0700 Zack Weinberg <zack@bitmover.com>
* stdbool.h: Make the typedef name _Bool, with bool a #defined
alias.
Sun Aug 29 09:36:50 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Sun Aug 29 09:36:50 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* tree.c (tree_code_name): Constify a char*. * tree.c (tree_code_name): Constify a char*.
......
...@@ -2,18 +2,21 @@ ...@@ -2,18 +2,21 @@
#ifndef __STDBOOL_H__ #ifndef __STDBOOL_H__
#define __STDBOOL_H__ 1 #define __STDBOOL_H__ 1
/* The type `bool' must promote to `int' or `unsigned int'. The constants /* The type `_Bool' must promote to `int' or `unsigned int'. The constants
`true' and `false' must have the value 0 and 1 respectively. */ `true' and `false' must have the value 0 and 1 respectively. */
typedef enum typedef enum
{ {
false = 0, false = 0,
true = 1 true = 1
} bool; } _Bool;
/* The names `true' and `false' must also be made available as macros. */ /* The names `true' and `false' must also be made available as macros. */
#define false false #define false false
#define true true #define true true
/* The macro `bool', which may be undefined, expands to _Bool. */
#define bool _Bool
/* Signal that all the definitions are present. */ /* Signal that all the definitions are present. */
#define __bool_true_false_are_defined 1 #define __bool_true_false_are_defined 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment