summaryrefslogtreecommitdiff
path: root/lib/stdbool_.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-12-13 19:42:27 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-12-13 19:42:27 +0000
commit4170c66d455a4b6775e0224c72cb510f5923a56a (patch)
treef9ccd0b9f83cb12a69d9c218d6591a68bd2222d2 /lib/stdbool_.h
parenteaebfec990d331f44b527fda650dcf68197a5043 (diff)
downloadcoreutils-4170c66d455a4b6775e0224c72cb510f5923a56a.tar.xz
(_Bool): Resurrect the "#if !@HAVE__BOOL@" check, to
work around compilers that have a (possibly-broken) _Bool but lack a working <stdbool.h>.
Diffstat (limited to 'lib/stdbool_.h')
-rw-r--r--lib/stdbool_.h10
1 files changed, 6 insertions, 4 deletions
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