Files
RedBear-OS/include/stdbool.h
Red Bear OS 4eabdf2016 relibc: integrate upstream wchar.h include ordering + stdbool.h POSIX fix
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
2026-06-29 01:34:09 +03:00

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 */