stdbool.h revision 360660
11541Srgrimes/*===---- stdbool.h - Standard header for booleans -------------------------=== 21541Srgrimes * 31541Srgrimes * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 41541Srgrimes * See https://llvm.org/LICENSE.txt for license information. 51541Srgrimes * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 61541Srgrimes * 71541Srgrimes *===-----------------------------------------------------------------------=== 845773Sdcs */ 945773Sdcs 101541Srgrimes#ifndef __STDBOOL_H 111541Srgrimes#define __STDBOOL_H 121541Srgrimes 131541Srgrimes/* Don't define bool, true, and false in C++, except as a GNU extension. */ 141541Srgrimes#ifndef __cplusplus 151541Srgrimes#define bool _Bool 161541Srgrimes#define true 1 171541Srgrimes#define false 0 181541Srgrimes#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) 191541Srgrimes/* Define _Bool as a GNU extension. */ 201541Srgrimes#define _Bool bool 211541Srgrimes#if __cplusplus < 201103L 221541Srgrimes/* For C++98, define bool, false, true as a GNU extension. */ 231541Srgrimes#define bool bool 241541Srgrimes#define false false 251541Srgrimes#define true true 261541Srgrimes#endif 271541Srgrimes#endif 281541Srgrimes 291541Srgrimes#define __bool_true_false_are_defined 1 301541Srgrimes 311541Srgrimes#endif /* __STDBOOL_H */ 321541Srgrimes