ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
stdbool.h
Go to the documentation of this file.
1/*===---- stdbool.h - ClangTool workaround header --------------------------===
2 *
3 * This is a simplified stdbool.h that doesn't use __has_include_next.
4 * ClangTool/LibTooling has a bug where __has_include_next errors instead of
5 * returning false when a header doesn't exist. This causes the standard
6 * clang stdbool.h to fail on macOS.
7 *
8 * This header provides the same functionality as the standard stdbool.h
9 * without the problematic __has_include_next check.
10 *
11 *===-----------------------------------------------------------------------===
12 */
13
14#ifndef __STDBOOL_H
15#define __STDBOOL_H
16
17#define __bool_true_false_are_defined 1
18
19#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L
20/* C23+ defines bool, true, false as keywords */
21#elif !defined(__cplusplus)
22#define bool _Bool
23#define true 1
24#define false 0
25#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
26/* Define _Bool as a GNU extension for C++ */
27#define _Bool bool
28#if defined(__cplusplus) && __cplusplus < 201103L
29/* For C++98, define bool, false, true as a GNU extension. */
30#define bool bool
31#define false false
32#define true true
33#endif
34#endif
35
36#endif /* __STDBOOL_H */