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 4e10e2a..8bb49e2 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 8d85749..54daf84 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 494d71a..36dedf5 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 df2dab0..eef3931 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 761e853..af86c83 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 8278041..9ba2bce 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 a5f9c01..096bf9c 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 abce3bc..bd9d0d2 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 efbe08f..10629f6 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 3ffb177..b7f70b5 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 9a637f2..f4c2551 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 e01b366..82aefb4 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 0114b46..62937c7 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 4df1567..62e2b77 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 6976dad..d67b766 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 9d8b0c4..976005c 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 4fc3287..97c98bf 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 2ed82fe..0e12d94 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 a55c333..f10d462 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 c884567..7d508cc 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 5047094..0c87af2 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 c1d2315..a16eea0 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 221177a..44b0f85 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 b9d08b5..2d20427 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 1422fae..b703200 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 7d0a111..6226544 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 e7c092a..439d3bb 100644 (file)
@@ -18,7 +18,9 @@
 
 /* Written by Paul Eggert.  */
 
+#if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
+#endif
 
 #if defined _GL_SYS_TIME_H
 
index 14b0b36..73da88d 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 bb3bd01..fba8fce 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 8b4facb..2ffca21 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 606a70a..ceb6208 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 e3ed367..8b33d71 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 91ecbb0..b6e4d3a 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