1102644Snectar/*===---- stdbool.h - Standard header for booleans -------------------------===
255682Smarkm *
3142403Snectar * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4233294Sstas * See https://llvm.org/LICENSE.txt for license information.
5142403Snectar * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6127808Snectar *
7127808Snectar *===-----------------------------------------------------------------------===
8127808Snectar */
9102644Snectar
10127808Snectar#ifndef __STDBOOL_H
11102644Snectar#define __STDBOOL_H
12127808Snectar
13127808Snectar/* Don't define bool, true, and false in C++, except as a GNU extension. */
14127808Snectar#ifndef __cplusplus
15127808Snectar#define bool _Bool
16127808Snectar#define true 1
17127808Snectar#define false 0
18127808Snectar#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
19127808Snectar/* Define _Bool as a GNU extension. */
20127808Snectar#define _Bool bool
21127808Snectar#if __cplusplus < 201103L
22127808Snectar/* For C++98, define bool, false, true as a GNU extension. */
23127808Snectar#define bool  bool
24127808Snectar#define false false
25127808Snectar#define true  true
26127808Snectar#endif
27127808Snectar#endif
28127808Snectar
29127808Snectar#define __bool_true_false_are_defined 1
30127808Snectar
31127808Snectar#endif /* __STDBOOL_H */
32127808Snectar