28 lines
695 B
C
28 lines
695 B
C
#ifndef VLIBC_STDBOOL_H
|
|
#define VLIBC_STDBOOL_H
|
|
|
|
/*
|
|
* vlibc — <stdbool.h>.
|
|
*
|
|
* In C23 bool, true and false are keywords, so this header defines only the
|
|
* guard macro __bool_true_false_are_defined. In C17 (and older) it defines
|
|
* the _Bool-based spellings the standard requires. In C++ the three names are
|
|
* keywords as well, so only the guard macro is defined there too.
|
|
*
|
|
* This header is ISO C core and is present in every profile.
|
|
*/
|
|
|
|
#include <vlibc/features.h>
|
|
|
|
#ifndef __cplusplus
|
|
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L
|
|
#define bool _Bool
|
|
#define true 1
|
|
#define false 0
|
|
#endif
|
|
#endif
|
|
|
|
#define __bool_true_false_are_defined 1
|
|
|
|
#endif /* VLIBC_STDBOOL_H */
|