changeset 29090:4d6c2585cdc3

Fix Tru64 problem with stdbool.h. * lib/stdbool.in.h (false, true): [! (defined __cplusplus || defined __BEOS__) && !defined __GNUC__]: Don't declare as an enum in this situation; it runs afoul of Tru64. Problem reported by Steven M. Schweda in <http://lists.gnu.org/archive/html/bug-autoconf/2007-10/msg00019.html>.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 22 Oct 2007 14:59:23 -0700
parents 508a3b2e4039
children a0535d2b09bc
files ChangeLog lib/stdbool.in.h
diffstat 2 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Oct 22 14:09:16 2007 -0600
+++ b/ChangeLog	Mon Oct 22 14:59:23 2007 -0700
@@ -1,3 +1,12 @@
+2007-10-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Fix Tru64 problem with stdbool.h.
+	* lib/stdbool.in.h (false, true):
+	[! (defined __cplusplus || defined __BEOS__) && !defined __GNUC__]:
+	Don't declare as an enum in this situation; it runs afoul of Tru64.
+	Problem reported by Steven M. Schweda in
+	<http://lists.gnu.org/archive/html/bug-autoconf/2007-10/msg00019.html>.
+
 2007-10-22  Eric Blake  <ebb9@byu.net>
 
 	Also wrap vf?printf.
--- a/lib/stdbool.in.h	Mon Oct 22 14:09:16 2007 -0600
+++ b/lib/stdbool.in.h	Mon Oct 22 14:59:23 2007 -0700
@@ -97,10 +97,11 @@
           "warning: _Bool is a keyword in ISO C99".
         Use of an enum type, with IRIX cc, leads to a stupid
           "warning(1185): enumerated type mixed with another type".
-        The only benefit of the enum type, debuggability, is not important
-        with these compilers.  So use 'signed char' and no typedef.  */
+        Even the existence of an enum type, without a typedef,
+          "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
+        The only benefit of the enum, debuggability, is not important
+        with these compilers.  So use 'signed char' and no enum.  */
 #  define _Bool signed char
-enum { false = 0, true = 1 };
 # else
    /* With this compiler, trust the _Bool type if the compiler has it.  */
 #  if !@HAVE__BOOL@