xref: /openbsd-src/include/stdbool.h (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
1 /* $OpenBSD: stdbool.h,v 1.2 1999/09/24 23:09:09 espie Exp $ */
2 
3 /*
4  * Written by Marc Espie, September 25, 1999
5  * Public domain.
6  */
7 
8 #ifndef	_STDBOOL_H_
9 #define	_STDBOOL_H_
10 
11 /* `_Bool' type must promote to `int' or `unsigned int'. */
12 typedef enum {
13 	false = 0,
14 	true = 1
15 } _Bool;
16 
17 /* And those constants must also be available as macros. */
18 #define	false	false
19 #define	true	true
20 
21 /* User visible type `bool' is provided as a macro which may be redefined */
22 #define bool _Bool
23 
24 /* Inform that everything is fine */
25 #define __bool_true_false_are_defined 1
26 
27 #endif /* _STDBOOL_H_ */
28