]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(_Bool): Resurrect the "#if !@HAVE__BOOL@" check, to
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Dec 2005 19:42:27 +0000 (19:42 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Dec 2005 19:42:27 +0000 (19:42 +0000)
work around compilers that have a (possibly-broken) _Bool but lack
a working <stdbool.h>.

lib/ChangeLog
lib/stdbool_.h

index 84e45289402aa5c0677db75b8efdf53e0dee9041..b4e43f100e1f6c7150eaaedcf3a0887d7b725152 100644 (file)
@@ -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
index c2c134e020da21dbfeb9144bf4d3011e431bd1c9..7cd2da8406e1bc6ac795682bb98c3bea9310e66b 100644 (file)
 # 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