Eric Fiselier | a6b7ebe | 2016-02-20 00:16:41 +0000 | [diff] [blame] | 1 | // -*- C++ -*- |
Louis Dionne | eb8650a | 2021-11-17 16:25:01 -0500 | [diff] [blame] | 2 | //===----------------------------------------------------------------------===// |
Eric Fiselier | a6b7ebe | 2016-02-20 00:16:41 +0000 | [diff] [blame] | 3 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | // See https://llvm.org/LICENSE.txt for license information. |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Eric Fiselier | a6b7ebe | 2016-02-20 00:16:41 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Louis Dionne | 480cd78 | 2022-11-25 10:25:10 -0500 | [diff] [blame] | 9 | |
Eric Fiselier | a6b7ebe | 2016-02-20 00:16:41 +0000 | [diff] [blame] | 10 | #ifndef _LIBCPP_STDBOOL_H |
| 11 | #define _LIBCPP_STDBOOL_H |
| 12 | |
Eric Fiselier | a6b7ebe | 2016-02-20 00:16:41 +0000 | [diff] [blame] | 13 | /* |
| 14 | stdbool.h synopsis |
| 15 | |
| 16 | Macros: |
| 17 | |
| 18 | __bool_true_false_are_defined |
| 19 | |
| 20 | */ |
| 21 | |
Nikolas Klauser | b9a2658 | 2024-12-21 13:01:48 +0100 | [diff] [blame] | 22 | #if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) |
| 23 | # include <__cxx03/stdbool.h> |
| 24 | #else |
Nikolas Klauser | c166a9c | 2024-12-10 16:02:12 +0100 | [diff] [blame] | 25 | # include <__config> |
Eric Fiselier | a6b7ebe | 2016-02-20 00:16:41 +0000 | [diff] [blame] | 26 | |
Nikolas Klauser | c166a9c | 2024-12-10 16:02:12 +0100 | [diff] [blame] | 27 | # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 28 | # pragma GCC system_header |
| 29 | # endif |
Eric Fiselier | a6b7ebe | 2016-02-20 00:16:41 +0000 | [diff] [blame] | 30 | |
Nikolas Klauser | c166a9c | 2024-12-10 16:02:12 +0100 | [diff] [blame] | 31 | # if __has_include_next(<stdbool.h>) |
| 32 | # include_next <stdbool.h> |
| 33 | # endif |
Eric Fiselier | a6b7ebe | 2016-02-20 00:16:41 +0000 | [diff] [blame] | 34 | |
Nikolas Klauser | c166a9c | 2024-12-10 16:02:12 +0100 | [diff] [blame] | 35 | # ifdef __cplusplus |
| 36 | # undef bool |
| 37 | # undef true |
| 38 | # undef false |
| 39 | # undef __bool_true_false_are_defined |
| 40 | # define __bool_true_false_are_defined 1 |
| 41 | # endif |
Nikolas Klauser | b9a2658 | 2024-12-21 13:01:48 +0100 | [diff] [blame] | 42 | #endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) |
Eric Fiselier | a6b7ebe | 2016-02-20 00:16:41 +0000 | [diff] [blame] | 43 | |
Louis Dionne | 4cd6ca1 | 2021-04-20 12:03:32 -0400 | [diff] [blame] | 44 | #endif // _LIBCPP_STDBOOL_H |