Avoid gcc warnings because of #pragma GCC system_header on older gcc.
authorBruno Haible <bruno@clisp.org>
Sat, 18 Oct 2008 00:43:18 +0000 (02:43 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 18 Oct 2008 00:43:18 +0000 (02:43 +0200)
33 files changed:
ChangeLog
lib/arpa_inet.in.h
lib/dirent.in.h
lib/errno.in.h
lib/fcntl.in.h
lib/float.in.h
lib/iconv.in.h
lib/inttypes.in.h
lib/locale.in.h
lib/math.in.h
lib/netdb.in.h
lib/netinet_in.in.h
lib/search.in.h
lib/signal.in.h
lib/spawn.in.h
lib/stdarg.in.h
lib/stdint.in.h
lib/stdio.in.h
lib/stdlib.in.h
lib/string.in.h
lib/strings.in.h
lib/sys_file.in.h
lib/sys_ioctl.in.h
lib/sys_select.in.h
lib/sys_socket.in.h
lib/sys_stat.in.h
lib/sys_time.in.h
lib/sysexits.in.h
lib/time.in.h
lib/unistd.in.h
lib/wchar.in.h
lib/wctype.in.h
m4/include_next.m4

index 4e10e2a8aeb8eb9bc709b3ab2d1ab6fd92fb5f02..8bb49e2884f13d875220f123efafc30d0a2ef21d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,38 @@
 2008-10-17  Bruno Haible  <bruno@clisp.org>
 
        Avoid gcc warnings because of #pragma GCC system_header on older gcc.
-       * m4/include_next.m4: Require autoconf >= 2.60.
-       (gl_INCLUDE_NEXT): Use #pragma GCC system_header only for GCC 3.0 or
-       newer.
+       * lib/arpa_inet.in.h: Encloses reference to PRAGMA_SYSTEM_HEADER so
+       that it gets activated only for gcc >= 3.0.
+       * lib/dirent.in.h: Likewise.
+       * lib/errno.in.h: Likewise.
+       * lib/fcntl.in.h: Likewise.
+       * lib/float.in.h: Likewise.
+       * lib/iconv.in.h: Likewise.
+       * lib/inttypes.in.h: Likewise.
+       * lib/locale.in.h: Likewise.
+       * lib/math.in.h: Likewise.
+       * lib/netdb.in.h: Likewise.
+       * lib/netinet_in.in.h: Likewise.
+       * lib/search.in.h: Likewise.
+       * lib/signal.in.h: Likewise.
+       * lib/spawn.in.h: Likewise.
+       * lib/stdarg.in.h: Likewise.
+       * lib/stdint.in.h: Likewise.
+       * lib/stdio.in.h: Likewise.
+       * lib/stdlib.in.h: Likewise.
+       * lib/string.in.h: Likewise.
+       * lib/strings.in.h: Likewise.
+       * lib/sys_file.in.h: Likewise.
+       * lib/sys_ioctl.in.h: Likewise.
+       * lib/sys_select.in.h: Likewise.
+       * lib/sys_socket.in.h: Likewise.
+       * lib/sys_stat.in.h: Likewise.
+       * lib/sys_time.in.h: Likewise.
+       * lib/sysexits.in.h: Likewise.
+       * lib/time.in.h: Likewise.
+       * lib/unistd.in.h: Likewise.
+       * lib/wchar.in.h: Likewise.
+       * lib/wctype.in.h: Likewise.
        Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
 
 2008-10-17  Jim Meyering  <meyering@redhat.com>
index 8d85749e0718ba0e91d89fdf47cb128a4c9754d2..54daf843703d4ea0960eb88ef429669abf7fb693 100644 (file)
@@ -24,7 +24,9 @@
 
 #if @HAVE_ARPA_INET_H@
 
+# if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+# endif
 
 /* The include_next requires a split double-inclusion guard.  */
 # @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@
index 494d71abb74d32065532f14e9d970c96ee904d6f..36dedf5ddb9243df6ec2576d12f7e4490f8da804 100644 (file)
@@ -16,7 +16,9 @@
 
 #ifndef _GL_DIRENT_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_DIRENT_H@
index df2dab099a39c071614a9fb583cb97d7df7633a5..eef3931f9c2766b743326ae43b17c77add0168b2 100644 (file)
@@ -18,7 +18,9 @@
 
 #ifndef _GL_ERRNO_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_ERRNO_H@
index 761e853153bac15195a8b7830c592d199b2f5308..af86c832220f6bf8775ce74aea1d289fe84ad568 100644 (file)
@@ -17,7 +17,9 @@
 
 /* written by Paul Eggert */
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 #if defined __need_system_fcntl_h
 /* Special invocation convention.  */
index 82780416431def73d99576d98dfe0166a0766783..9ba2bce4b5bdb912ae3b6087a30cad1504ce3421 100644 (file)
@@ -17,7 +17,9 @@
 
 #ifndef _GL_FLOAT_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_FLOAT_H@
index a5f9c01acf960040b51c3fa24a279da912c0c827..096bf9c4cf23427100fb5986f2fddaf3c7bad365 100644 (file)
@@ -18,7 +18,9 @@
 
 #ifndef _GL_ICONV_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_ICONV_H@
index abce3bc1ca837491adcb5a6a7f789bbf7b923643..bd9d0d2475833000797bad8bc4d2b6c32776f86e 100644 (file)
@@ -26,7 +26,9 @@
    The include_next requires a split double-inclusion guard.  */
 #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 # if @HAVE_INTTYPES_H@
+#  if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#  endif
 #  @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
 # endif
 #endif
index efbe08f262840aa876c7f313cde464887aad086a..10629f6c79c215b23a02c215961b95d987f0342e 100644 (file)
@@ -16,7 +16,9 @@
 
 #ifndef _GL_LOCALE_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_LOCALE_H@
index 3ffb1774b455096df464d63bdb8ef3efa50b8bf3..b7f70b58bdba90650056fb008722d60bfa36c700 100644 (file)
@@ -17,7 +17,9 @@
 
 #ifndef _GL_MATH_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_MATH_H@
index 9a637f28f432fc013167f1b5e4f26918cfb27193..f4c2551ced376e999b73280f79b7565564754240 100644 (file)
@@ -24,7 +24,9 @@
 
 #if @HAVE_NETDB_H@
 
+# if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+# endif
 
 /* The include_next requires a split double-inclusion guard.  */
 # @INCLUDE_NEXT@ @NEXT_NETDB_H@
index e01b3666295fd6c81e6157b3fb095343341b1cf9..82aefb4992494fb95950cb75565710d11a28f2cf 100644 (file)
@@ -19,7 +19,9 @@
 
 #if @HAVE_NETINET_IN_H@
 
+# if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+# endif
 
 /* On many platforms, <netinet/in.h> assumes prior inclusion of
    <sys/types.h>.  */
index 0114b468067bec53ecf8e7f7f5f2efc0b8b28fb8..62937c760ab09ea6b917fd730ee932ad7da4324d 100644 (file)
@@ -19,7 +19,9 @@
 
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_SEARCH_H@
+# if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+# endif
 # @INCLUDE_NEXT@ @NEXT_SEARCH_H@
 #endif
 
index 4df1567c92bdd5730ef5e69150fa8136c798a1bb..62e2b778d18e47a35388e7d1c333f9496f4e30a1 100644 (file)
@@ -15,7 +15,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 #if defined __need_sig_atomic_t || defined __need_sigset_t
 /* Special invocation convention inside glibc header files.  */
index 6976dade2790deaf44ef87f5b183dfe27374f107..d67b766ed8131d436bbf7846fb99ee5343f2b826 100644 (file)
@@ -17,7 +17,9 @@
 
 #ifndef _GL_SPAWN_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_SPAWN_H@
index 9d8b0c4fb9e7cbd04e17ec9a23d6ba8e7cf7c302..976005c0c3f8ee1ac047a29f60b0c630e39b8c29 100644 (file)
@@ -17,7 +17,9 @@
 
 #ifndef _GL_STDARG_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_STDARG_H@
index 4fc3287752305d0f069ac3be21b2f56f6f9e7842..97c98bf328f6519adac082f548d888888baba726 100644 (file)
@@ -49,7 +49,9 @@
      in <inttypes.h> would reinclude us, skipping our contents because
      _GL_STDINT_H is defined.
      The include_next requires a split double-inclusion guard.  */
+# if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+# endif
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 #endif
 
index 2ed82fe702bf95c15c0525701487698080303399..0e12d945306ff1d2f4da371dd7f548ffedb913f8 100644 (file)
@@ -16,7 +16,9 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 #if defined __need_FILE || defined __need___FILE
 /* Special invocation convention inside glibc header files.  */
index a55c333035426e6fb5c8128b39fdeea24db5ff38..f10d46232190b26d6146bef62c596af2e76d5b34 100644 (file)
@@ -15,7 +15,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 #if defined __need_malloc_and_calloc
 /* Special invocation convention inside glibc header files.  */
index c8845671baf29e64dbec9d2dc193fd1220183523..7d508ccdf5d5e94808e884261a34ca418e50122e 100644 (file)
@@ -18,7 +18,9 @@
 
 #ifndef _GL_STRING_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_STRING_H@
index 50470943dc78dd0f0084de60ac471cfc765dde54..0c87af210843ee32a149ca5255831f2c29292520 100644 (file)
@@ -18,7 +18,9 @@
 
 #ifndef _GL_STRINGS_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_STRINGS_H@
index c1d2315c0dbf2005dc197aea0a074dacec0685f5..a16eea08335e19c08b323e0a9eb7fbf6bdc6b0f3 100644 (file)
@@ -19,7 +19,9 @@
 /* Written by Richard W.M. Jones.  */
 #ifndef _GL_SYS_FILE_H
 
+# if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+# endif
 
 /* The include_next requires a split double-inclusion guard.  */
 # if @HAVE_SYS_FILE_H@
index 221177a3cee31935552c0354b4d96550d3ed9a97..44b0f8516a5b00a0859ced9d31ae3754e1b5e551 100644 (file)
@@ -17,7 +17,9 @@
 
 #ifndef _GL_SYS_IOCTL_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_SYS_IOCTL_H@
index b9d08b5c7f4242e39ba4799c719704ebc182fe06..2d2042783961d3ace573f9dab366638b4908f089 100644 (file)
@@ -19,7 +19,9 @@
 
 #if @HAVE_SYS_SELECT_H@
 
+# if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+# endif
 
 /* On many platforms, <sys/select.h> assumes prior inclusion of
    <sys/types.h>.  */
index 1422faeffb8284b6f0e4f13ca5c72270b7deeaf7..b703200088c0fa7501f4cb62595a9f1522aad7c0 100644 (file)
@@ -27,7 +27,9 @@
 
 #if @HAVE_SYS_SOCKET_H@
 
+# if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+# endif
 
 /* On many platforms, <sys/socket.h> assumes prior inclusion of
    <sys/types.h>.  */
index 7d0a1117f5162a28079a4789e69d9fd2b044be62..6226544762d5fcd7ee2f41c33218ab148dab4a5b 100644 (file)
@@ -23,7 +23,9 @@
 
 #ifndef _GL_SYS_STAT_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
index e7c092ab83a0fcd1972cb8694667f2b7b512df0c..439d3bb239180758c66685de2379b65d697736d2 100644 (file)
@@ -18,7 +18,9 @@
 
 /* Written by Paul Eggert.  */
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 #if defined _GL_SYS_TIME_H
 
index 14b0b364d960d96775564029a20d498d00cbaab2..73da88db72925db9bddd03f01e647566c3537e32 100644 (file)
@@ -20,7 +20,9 @@
 
 #if @HAVE_SYSEXITS_H@
 
+# if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+# endif
 
 /* IRIX 6.5 has an <unistd.h> that defines a macro EX_OK with a nonzero
    value.  Override it.  See
index bb3bd01bf579adbbd2cc6a0041c133ea3f734f90..fba8fce074f2d610787d314d6b38b6d1f0ef9c38 100644 (file)
@@ -16,7 +16,9 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* Don't get in the way of glibc when it includes time.h merely to
    declare a few standard symbols, rather than to declare all the
index 8b4facbd472507411eb5038717e87b5092e82eed..2ffca21458c914ae642e7f691d15d720f4e39624 100644 (file)
@@ -17,7 +17,9 @@
 
 #ifndef _GL_UNISTD_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_UNISTD_H@
index 606a70a1c7daf0302f992cd76c7631cd75af0e77..ceb62084f013b68ed669219d87b5644482a5e732 100644 (file)
@@ -26,7 +26,9 @@
  * the declaration of wcwidth().
  */
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 #ifdef __need_mbstate_t
 /* Special invocation convention inside uClibc header files.  */
index e3ed3679e8fa0c8201961208686dd7fa58b0020b..8b33d7134f617bc9fd7ba3cc2784c3a3d1cd05e6 100644 (file)
@@ -28,7 +28,9 @@
 
 #ifndef _GL_WCTYPE_H
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 #if @HAVE_WINT_T@
 /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
index 91ecbb0965a2f6eee78fb96c6e99310860b180f3..b6e4d3ae7a92c2e1a7c83b5325a31fadf25f8ff7 100644 (file)
@@ -1,4 +1,4 @@
-# include_next.m4 serial 9
+# include_next.m4 serial 8
 dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,8 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Paul Eggert and Derek Price.
 
-AC_PREREQ([2.60])
-
 dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
 dnl
 dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
@@ -61,10 +59,7 @@ EOF
   if test $gl_cv_have_include_next = yes; then
     INCLUDE_NEXT=include_next
     if test -n "$GCC"; then
-      dnl GCC 3.0 or newer supports #pragma GCC system_header.
-      PRAGMA_SYSTEM_HEADER='#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif'
+      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
     fi
   else
     INCLUDE_NEXT=include