bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stdint module on SGI


From: Mark D. Baushke
Subject: stdint module on SGI
Date: Wed, 21 Jun 2006 11:25:16 -0700

Hi Bruno,

The following two patches take a closer step toward making things work
under the default c89 compiler on SGI boxes.

All files that #include <stdint.h> still get warnings like this one:

cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
  #error directive:  This header file is to be used only for c99 mode
          compilations

  #error This header file is to be used only for c99 mode compilations
   ^

right now. It might be nice if just the existence of <stdint.h> did not
imply that it was useful to the compiler... However, I will leave that
to you for future changes.

The correct thing to include on SGI IRIX 6.5 boxes is apparently the
<inttypes.h> file which has all of the correct typedef and macro
definitions.

Given that a conforming C99 function <inttypes.h> is supposed to include
<stdint.h>, I wonder if it makes sense to try to only #include
<inttypes.h> and see if that works before attempting to try to #include
<stdint.h> along with it.

        -- Mark

Index: lib/stdint_.h
===================================================================
RCS file: /sources/gnulib/gnulib/lib/stdint_.h,v
retrieving revision 1.17
diff -u -p -r1.17 stdint_.h
--- lib/stdint_.h       17 Jun 2006 20:02:16 -0000      1.17
+++ lib/stdint_.h       21 Jun 2006 18:17:15 -0000
@@ -55,7 +55,7 @@
      But note that <sys/int_types.h> contains only the type definitions!  */
 # include <sys/inttypes.h>
 #endif
-#if (defined(__hpux) || defined(_AIX)) && @HAVE_INTTYPES_H@
+#if (defined(__hpux) || defined(_AIX) || defined(__sgi)) && @HAVE_INTTYPES_H@
   /* HP-UX 10 <inttypes.h> has nearly everything, except UINT_LEAST8_MAX,
      UINT_FAST8_MAX, PTRDIFF_MIN, PTRDIFF_MAX.  */
   /* AIX 4 <inttypes.h> has nearly everything, except INTPTR_MIN, INTPTR_MAX,
Index: m4/stdint.m4
===================================================================
RCS file: /sources/gnulib/gnulib/m4/stdint.m4,v
retrieving revision 1.7
diff -u -p -r1.7 stdint.m4
--- m4/stdint.m4        19 Jun 2006 11:27:00 -0000      1.7
+++ m4/stdint.m4        21 Jun 2006 18:17:15 -0000
@@ -102,7 +102,7 @@ typedef int array [2 * (POW63 != 0 && PO
 #if defined(__sun) && HAVE_SYS_INTTYPES_H
 # include <sys/inttypes.h>
 #endif
-#if (defined(__hpux) || defined(_AIX)) && HAVE_INTTYPES_H
+#if (defined(__hpux) || defined(_AIX) || defined(__sgi)) && HAVE_INTTYPES_H
 # include FULL_PATH_INTTYPES_H
 #endif
 #if HAVE_STDINT_H




reply via email to

[Prev in Thread] Current Thread [Next in Thread]