summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ChangeLog6
-rw-r--r--lib/stdbool_.h10
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 84e452894..b4e43f100 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdbool_.h (_Bool): Resurrect the "#if !@HAVE__BOOL@" check, to
+ work around compilers that have a (possibly-broken) _Bool but lack
+ a working <stdbool.h>.
+
2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
* stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
diff --git a/lib/stdbool_.h b/lib/stdbool_.h
index c2c134e02..7cd2da840 100644
--- a/lib/stdbool_.h
+++ b/lib/stdbool_.h
@@ -59,10 +59,10 @@
# include <OS.h> /* defines bool but not _Bool */
#endif
-/* C++ and BeOS have a reliable _Bool. Otherwise, since this file is
- being compiled, the system <stdbool.h> 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
+ <stdbool.h> 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