2023-08-13 05:30:05 +00:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_STDBOOL_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_STDBOOL_H_
|
|
|
|
|
|
|
|
#ifndef __cplusplus
|
2024-02-01 11:39:46 +00:00
|
|
|
|
2023-08-13 05:30:05 +00:00
|
|
|
#define bool _Bool
|
2024-02-01 11:39:46 +00:00
|
|
|
#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L
|
|
|
|
#define true ((_Bool) + 1u)
|
|
|
|
#define false ((_Bool) + 0u)
|
2023-08-13 05:30:05 +00:00
|
|
|
#else
|
2024-02-01 11:39:46 +00:00
|
|
|
#define true 1
|
2023-08-13 05:30:05 +00:00
|
|
|
#define false 0
|
2024-02-01 11:39:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#else /* __cplusplus */
|
|
|
|
|
|
|
|
#define _Bool bool
|
|
|
|
|
2023-08-13 05:30:05 +00:00
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2024-02-01 11:39:46 +00:00
|
|
|
#define __bool_true_false_are_defined 1
|
2023-08-13 05:30:05 +00:00
|
|
|
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_STDBOOL_H_ */
|