]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(_Bool): Use a #define, not a typedef.
authorJim Meyering <jim@meyering.net>
Sun, 3 Aug 2003 10:20:32 +0000 (10:20 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 3 Aug 2003 10:20:32 +0000 (10:20 +0000)
lib/stdbool_.h

index d0cb70d54cddade95e7da99bd02d967080441ef3..c29958d4a5433f2514bd1f4f3ba2b2bbcbccc338 100644 (file)
 /* For the sake of symbolic names in gdb, define true and false as
    enum constants.  However, do not define _Bool as the enum type,
    since the enum type might be compatible with unsigned int, whereas
-   _Bool must promote to int.  */
+   _Bool must promote to int.  Also, make _Bool a macro rather than a
+   typedef, to suppress warnings by the Sun Forte Developer 7 C
+   compiler that _Bool is a keyword in ISO C99.  */
 #ifndef __cplusplus
 # if !@HAVE__BOOL@
 enum { false = 0, true = 1 };
-typedef signed char _Bool;
+#  define _Bool signed char
 # endif
 #else
 typedef bool _Bool;