projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c597eff
)
Work around HP-UX and AIX C compiler bugs with built-in _Bool.
author
Bruno Haible
<bruno@clisp.org>
Tue, 24 Jan 2006 21:44:37 +0000
(21:44 +0000)
committer
Bruno Haible
<bruno@clisp.org>
Tue, 24 Jan 2006 21:44:37 +0000
(21:44 +0000)
lib/ChangeLog
patch
|
blob
|
history
lib/stdbool_.h
patch
|
blob
|
history
diff --git
a/lib/ChangeLog
b/lib/ChangeLog
index 163a204835191fbe6a54aacf9b94460da648b542..c3f544ab1413b9d0309d94130d2deca6d5c581a8 100644
(file)
--- a/
lib/ChangeLog
+++ b/
lib/ChangeLog
@@
-1,3
+1,9
@@
+2006-01-24 Bruno Haible <bruno@clisp.org>
+
+ * stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc] : Define as 'signed char'
+ to avoid problems with the built-in _Bool type.
+ Reported by Paul Eggert on 2005-11-26.
+
2006-01-24 Jim Meyering <jim@meyering.net>
* socket_.h: Remove useless parentheses in uses of cpp `defined'.
2006-01-24 Jim Meyering <jim@meyering.net>
* socket_.h: Remove useless parentheses in uses of cpp `defined'.
diff --git
a/lib/stdbool_.h
b/lib/stdbool_.h
index 3177ae03cf48588f39d4cfae235889d3a010f376..586b5c71733290d36297c857a7d16ee33ae291ea 100644
(file)
--- a/
lib/stdbool_.h
+++ b/
lib/stdbool_.h
@@
-1,4
+1,4
@@
-/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003
, 2006
Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
@@
-71,7
+71,18
@@
(see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
enum; this ensures that '_Bool' promotes to 'int'. */
#if !(defined __cplusplus || defined __BEOS__)
(see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
enum; this ensures that '_Bool' promotes to 'int'. */
#if !(defined __cplusplus || defined __BEOS__)
-# if !@HAVE__BOOL@
+# if @HAVE__BOOL@
+# if defined __HP_cc || defined __xlc__
+ /* Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
+ the built-in _Bool type is used. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ Override it. */
+# define _Bool signed char
+enum { false = 0, true = 1 };
+# endif
+# else
# if defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1)
/* Avoid stupid "warning: _Bool is a keyword in ISO C99". */
# define _Bool signed char
# if defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1)
/* Avoid stupid "warning: _Bool is a keyword in ISO C99". */
# define _Bool signed char