Greg Hartman | 76d05dc | 2016-11-23 15:51:27 -0800 | [diff] [blame] | 1 | /* |
2 | * | ||||
3 | * stdbool.h | ||||
4 | */ | ||||
5 | |||||
6 | #ifndef _STDBOOL_H | ||||
7 | #define _STDBOOL_H | ||||
8 | |||||
9 | #ifndef __cplusplus | ||||
10 | |||||
11 | #if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) | ||||
12 | # if !defined(__GNUC__) ||(__GNUC__ < 3) | ||||
13 | typedef char _Bool; /* For C compilers without _Bool */ | ||||
14 | # endif | ||||
15 | #endif | ||||
16 | |||||
17 | #define bool _Bool | ||||
18 | #define true 1 | ||||
19 | #define false 0 | ||||
20 | |||||
21 | #else | ||||
22 | |||||
23 | /* C++ */ | ||||
24 | #define bool bool | ||||
25 | #define true true | ||||
26 | #define false false | ||||
27 | |||||
28 | #endif | ||||
29 | |||||
30 | #define __bool_true_false_are_defined 1 | ||||
31 | |||||
32 | #endif /* _STDBOOL_H */ |