blob: c34853b97b854c4887213bc7d4425c7999c1fbb0 [file] [log] [blame]
Eric Fiseliera6b7ebe2016-02-20 00:16:41 +00001// -*- C++ -*-
Louis Dionneeb8650a2021-11-17 16:25:01 -05002//===----------------------------------------------------------------------===//
Eric Fiseliera6b7ebe2016-02-20 00:16:41 +00003//
Chandler Carruth57b08b02019-01-19 10:56:40 +00004// 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 Fiseliera6b7ebe2016-02-20 00:16:41 +00007//
8//===----------------------------------------------------------------------===//
Louis Dionne480cd782022-11-25 10:25:10 -05009
Eric Fiseliera6b7ebe2016-02-20 00:16:41 +000010#ifndef _LIBCPP_STDBOOL_H
11#define _LIBCPP_STDBOOL_H
12
Eric Fiseliera6b7ebe2016-02-20 00:16:41 +000013/*
14 stdbool.h synopsis
15
16Macros:
17
18 __bool_true_false_are_defined
19
20*/
21
Nikolas Klauserb9a26582024-12-21 13:01:48 +010022#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
23# include <__cxx03/stdbool.h>
24#else
Nikolas Klauserc166a9c2024-12-10 16:02:12 +010025# include <__config>
Eric Fiseliera6b7ebe2016-02-20 00:16:41 +000026
Nikolas Klauserc166a9c2024-12-10 16:02:12 +010027# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
28# pragma GCC system_header
29# endif
Eric Fiseliera6b7ebe2016-02-20 00:16:41 +000030
Nikolas Klauserc166a9c2024-12-10 16:02:12 +010031# if __has_include_next(<stdbool.h>)
32# include_next <stdbool.h>
33# endif
Eric Fiseliera6b7ebe2016-02-20 00:16:41 +000034
Nikolas Klauserc166a9c2024-12-10 16:02:12 +010035# 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 Klauserb9a26582024-12-21 13:01:48 +010042#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
Eric Fiseliera6b7ebe2016-02-20 00:16:41 +000043
Louis Dionne4cd6ca12021-04-20 12:03:32 -040044#endif // _LIBCPP_STDBOOL_H