From a9fa555c51f48b0db46196fd9359c18e4584816a Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Tue, 23 Oct 2007 12:34:10 -0700 Subject: [PATCH] Gnulib stdbool.h fix. --- ChangeLog | 5 +++++ lib/stdbool.in.h | 7 ++++--- lib/stdint.in.h | 5 +++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61cefef8..3ecf2909 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-10-23 Micah Cowan + + * lib/stdbool.in.h, lib/stdint.in.h: gnulib-tool --update. + Includes fix for broken stdbool.h on Tru64. + 2007-10-22 Micah Cowan * po/*.po: Refresh from TP and update-po. diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h index 150a0102..2784a502 100644 --- a/lib/stdbool.in.h +++ b/lib/stdbool.in.h @@ -97,10 +97,11 @@ typedef bool _Bool; "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@ diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 121118cf..ef0c3359 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -247,6 +247,11 @@ # define uintmax_t unsigned long int #endif +/* Verify that intmax_t and uintmax_t have the same size. Too much code + breaks if this is not the case. If this check fails, the reason is likely + to be found in the autoconf macros. */ +typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1]; + /* 7.18.2. Limits of specified-width integer types */ #if ! defined __cplusplus || defined __STDC_LIMIT_MACROS -- 2.39.2