# HG changeset patch # User Bruno Haible # Date 1151341437 0 # Node ID bcac002437d1033ccc003dc56ecc560477e11d44 # Parent 159a5bb87489abf99577f4c865a2743d8909f028 Tweak for SGI cc. diff --git a/lib/ChangeLog b/lib/ChangeLog --- 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 --- 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 --- 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 --- 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 @@ #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 '