summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-10-07 18:53:20 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-10-07 18:53:20 +0000
commit25041cf0f9d055198d4744ee0fa4602bc9ce9198 (patch)
tree4e798b72d485b6ecf44e7335fa65040ebbf9cccd /m4
parentb17333e415ff19f0fb4070c77182a43e86c6d405 (diff)
downloadcoreutils-25041cf0f9d055198d4744ee0fa4602bc9ce9198.tar.xz
(AC_HEADER_STDBOOL): Add an "#ifdef __xlc__" test,
since yesterday's attempt didn't work.
Diffstat (limited to 'm4')
-rw-r--r--m4/stdbool.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
index 945a03653..8893d0b1e 100644
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -71,6 +71,22 @@ AC_DEFUN([AC_HEADER_STDBOOL],
_Bool n[m];
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ <http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html>.
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make crosss-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
],
[
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k + !l