clibs
Tiny but handy utility libraries for C
boolean.h
Go to the documentation of this file.
1 
8 #ifndef CLIBS_BOOLEAN_H
9 #define CLIBS_BOOLEAN_H
10 
20 #ifdef __cplusplus
21  #ifndef _BOOL_IS_DEFINED
22  typedef bool BOOL;
23  #define FALSE false
24  #define TRUE true
25  #define _BOOL_IS_DEFINED
26  #endif /* BOOL */
27 #else
28  #if __STDC_VERSION__ < 199901L
29  #ifndef _BOOL_IS_DEFINED
30  typedef unsigned char BOOL;
31  #define FALSE 0
32  #define TRUE 1
33  #define _BOOL_IS_DEFINED
34  #endif /* BOOL */
35  #else
36  #ifndef _BOOL_IS_DEFINED
37  #include <stdbool.h>
38  typedef bool BOOL;
39  #define FALSE false
40  #define TRUE true
41  #define _BOOL_IS_DEFINED
42  #endif /* BOOL */
43  #endif /* C89 */
44 #endif /* __cplusplus */
45 
46 #endif /* CLIBS_BOOLEAN_H */
unsigned char BOOL
Custom boolean type.
Definition: boolean.h:30