From 4170c66d455a4b6775e0224c72cb510f5923a56a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 13 Dec 2005 19:42:27 +0000 Subject: [PATCH] (_Bool): Resurrect the "#if !@HAVE__BOOL@" check, to work around compilers that have a (possibly-broken) _Bool but lack a working . --- lib/ChangeLog | 6 ++++++ lib/stdbool_.h | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 84e4528940..b4e43f100e 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2005-12-13 Paul Eggert + + * stdbool_.h (_Bool): Resurrect the "#if !@HAVE__BOOL@" check, to + work around compilers that have a (possibly-broken) _Bool but lack + a working . + 2005-12-07 Paul Eggert * stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for diff --git a/lib/stdbool_.h b/lib/stdbool_.h index c2c134e020..7cd2da8406 100644 --- a/lib/stdbool_.h +++ b/lib/stdbool_.h @@ -59,10 +59,10 @@ # include /* defines bool but not _Bool */ #endif -/* C++ and BeOS have a reliable _Bool. Otherwise, since this file is - being compiled, the system is not reliable so assume - that the system _Bool is not reliable either. Under that - assumption, it is tempting to write +/* C++ and BeOS have a reliable bool (and _Bool, if it exists). + Otherwise, since this file is being compiled, the system + is not reliable so assume that the system _Bool is not + reliable either. Under that assumption, it is tempting to write typedef enum { false, true } _Bool; @@ -88,7 +88,9 @@ existing definition of _Bool and use our own. */ #if defined __cplusplus || defined __BEOS__ +# if !@HAVE__BOOL@ typedef bool _Bool; +# endif #else # define _Bool signed char #endif -- 2.47.3