4eabdf2016
Two upstream improvements integrated: 1. wchar.h cbindgen.toml — adopt upstream include ordering: - Remove redundant wchar_t redefinition (now provided by bits/wchar-t.h) - Define wint_t BEFORE #include <stddef.h> (conflict with GCC __need_wint_t) - Drop sys_includes, use no_includes=true (all includes in after_includes) - Cleaner circular-dependency breaking (wchar.h → stdio.h → inttypes.h → wchar.h) 2. stdbool.h — fix to POSIX standard: - Change 'typedef _Bool bool' to '#define bool _Bool' (C mode) - Remove 'typedef bool _Bool' (C++ mode, not in POSIX) - Only emit bool/true/false defines in C++ when __cplusplus < 201103L
20 lines
340 B
C
20 lines
340 B
C
#ifndef _STDBOOL_H
|
|
#define _STDBOOL_H
|
|
|
|
#ifndef __cplusplus
|
|
#define bool _Bool
|
|
#define true 1
|
|
#define false 0
|
|
#else /* __cplusplus */
|
|
#if __cplusplus < 201103L
|
|
#define bool bool
|
|
#define false false
|
|
#define true true
|
|
#endif /*__cplusplus < 201103L*/
|
|
#endif /* __cplusplus */
|
|
|
|
#define __bool_true_false_are_defined 1
|
|
|
|
|
|
#endif /* _STDBOOL_H */
|