From f12d386e3f1c4573d0e8d35c313867f5ae2d481f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 26 Jun 2006 17:03:57 +0000 Subject: [PATCH] Tweak for SGI cc. --- lib/ChangeLog | 6 ++++++ lib/stdint_.h | 11 ++++++++++- m4/ChangeLog | 6 ++++++ m4/stdint.m4 | 4 ++-- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 7e4bb63b03..0602728ec4 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2006-06-26 Bruno Haible + + * stdlib_.h: Don't include when using the SGI C compiler + in pre-C99 mode. + Suggested by Mark D. Baushke and Larry Jones. + 2006-06-23 Mark D. Baushke * stdlib_.h: Treat BSD/OS like OpenBSD. diff --git a/lib/stdint_.h b/lib/stdint_.h index b3f168c313..73d4f7df53 100644 --- a/lib/stdint_.h +++ b/lib/stdint_.h @@ -67,7 +67,16 @@ #endif #if @HAVE_STDINT_H@ /* Other systems may have an incomplete . */ -# include @FULL_PATH_STDINT_H@ + /* On some versions of IRIX, the SGI C compiler comes with an , + but + - in c99 mode, includes , + - in c89 mode, spews warnings. defines only + a subset of the types and macros that are defined in . + So we rely only on (included above). It means that in + c89 mode, we shadow the contents of warning-spewing . */ +# if !(defined(__sgi) && @HAVE_INTTYPES_H@ && !defined(_c99)) +# include @FULL_PATH_STDINT_H@ +# endif #endif /* 7.18.1.1. Exact-width integer types */ diff --git a/m4/ChangeLog b/m4/ChangeLog index f65519b837..10f1facaa4 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,9 @@ +2006-06-26 Bruno Haible + + * stdint.m4 (gl_STDINT_H): Don't include when using the + SGI C compiler in pre-C99 mode. + Suggested by Mark D. Baushke and Larry Jones. + 2006-06-23 Mark D. Baushke * stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD. diff --git a/m4/stdint.m4 b/m4/stdint.m4 index 63d16566cf..67aea94d5d 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -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 ' -- 2.30.2