summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-08-03 10:20:32 +0000
committerJim Meyering <jim@meyering.net>2003-08-03 10:20:32 +0000
commit016c2ea295db8ae42ffbb6cfe5f3fc36286abb75 (patch)
tree754cfc04264fc91586fdb908855e9347d39c9a06 /lib
parentc36e601b67d983b80b39ad61b06b8523507d260e (diff)
downloadcoreutils-016c2ea295db8ae42ffbb6cfe5f3fc36286abb75.tar.xz
(_Bool): Use a #define, not a typedef.
Diffstat (limited to 'lib')
-rw-r--r--lib/stdbool_.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/stdbool_.h b/lib/stdbool_.h
index d0cb70d54..c29958d4a 100644
--- a/lib/stdbool_.h
+++ b/lib/stdbool_.h
@@ -32,11 +32,13 @@
/* 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;