Tweak for SGI cc.
authorBruno Haible <bruno@clisp.org>
Mon, 26 Jun 2006 17:03:57 +0000 (17:03 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 26 Jun 2006 17:03:57 +0000 (17:03 +0000)
lib/ChangeLog
lib/stdint_.h
m4/ChangeLog
m4/stdint.m4

index 7e4bb63b030295fd62538cd370e58c2857085b36..0602728ec4014feeff339dd7d769b1e42fa74992 100644 (file)
@@ -1,3 +1,9 @@
+2006-06-26  Bruno Haible  <bruno@clisp.org>
+
+       * stdlib_.h: Don't include <stdint.h> when using the SGI C compiler
+       in pre-C99 mode.
+       Suggested by Mark D. Baushke and Larry Jones.
+
 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
 
        * stdlib_.h: Treat BSD/OS like OpenBSD.
index b3f168c313c1b7e4affbc4adb3673ed4f32264cd..73d4f7df53c9544d66072ed8701425549beb8e63 100644 (file)
 #endif
 #if @HAVE_STDINT_H@
   /* Other systems may have an incomplete <stdint.h>.  */
-# include @FULL_PATH_STDINT_H@
+  /* On some versions of IRIX, the SGI C compiler comes with an <stdint.h>,
+     but
+       - in c99 mode, <inttypes.h> includes <stdint.h>,
+       - in c89 mode, <stdint.h> spews warnings. <inttypes.h> defines only
+         a subset of the types and macros that are defined in <stdint.h>.
+     So we rely only on <inttypes.h> (included above).  It means that in
+     c89 mode, we shadow the contents of warning-spewing <stdint.h>.  */
+# if !(defined(__sgi) && @HAVE_INTTYPES_H@ && !defined(_c99))
+#  include @FULL_PATH_STDINT_H@
+# endif
 #endif
 
 /* 7.18.1.1. Exact-width integer types */
index f65519b8374efbca8fda326a3380cd02f61d1df9..10f1facaa40b38b766304cc8c8f23da437c9e442 100644 (file)
@@ -1,3 +1,9 @@
+2006-06-26  Bruno Haible  <bruno@clisp.org>
+
+       * stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
+       SGI C compiler in pre-C99 mode.
+       Suggested by Mark D. Baushke and Larry Jones.
+
 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
 
        * stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
index 63d16566cf14cbe5a2d541565266772024c70373..67aea94d5d84a3d7048840332683b2a88ec0c7cd 100644 (file)
@@ -1,4 +1,4 @@
-# stdint.m4 serial 9
+# stdint.m4 serial 10
 dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -105,7 +105,7 @@ typedef int array [2 * (POW63 != 0 && POW64 == 0) - 1];
 #if (defined(__hpux) || defined(_AIX)) && HAVE_INTTYPES_H
 # include FULL_PATH_INTTYPES_H
 #endif
-#if HAVE_STDINT_H
+#if HAVE_STDINT_H && !(defined(__sgi) && HAVE_INTTYPES_H && !defined(_c99))
 # include FULL_PATH_STDINT_H
 #endif
 '