* lib/dirent_.h: Prefer #include_next <foo.h> to #include
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 May 2007 15:56:05 +0000 (15:56 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 May 2007 15:56:05 +0000 (15:56 +0000)
@ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
GCC 4.2, which otherwise issues a lot of warnings.
* lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
* lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
Likewise.
* modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
* modules/iconv_open (iconv.h): Likewise.
* modules/locale (locale.h): Likewise.
* modules/netinet_in (netinet/in.h): Likewise.
* modules/sys_select (sys_select.h): Likewise.
* modules/sys_socket (sys/socket.h): Likewise.
* modules/sys_stat (sys/stat.h): Likewise.
* modules/sysexits (sysexits.h): Likewise.
* modules/unistd (unistd.h): Likewise.

19 files changed:
ChangeLog
lib/dirent_.h
lib/iconv_.h
lib/locale_.h
lib/netinet_in_.h
lib/sys_select_.h
lib/sys_socket_.h
lib/sys_stat_.h
lib/sysexits_.h
lib/unistd_.h
modules/fchdir
modules/iconv_open
modules/locale
modules/netinet_in
modules/sys_select
modules/sys_socket
modules/sys_stat
modules/sysexits
modules/unistd

index b0bc1bb29143b21efb35330aa72349c992301649..90f1911c6acdba7bbeb306cd2613845ef5363131 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lib/dirent_.h: Prefer #include_next <foo.h> to #include
+       @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
+       GCC 4.2, which otherwise issues a lot of warnings.
+       * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
+       * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
+       Likewise.
+       * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
+       * modules/iconv_open (iconv.h): Likewise.
+       * modules/locale (locale.h): Likewise.
+       * modules/netinet_in (netinet/in.h): Likewise.
+       * modules/sys_select (sys_select.h): Likewise.
+       * modules/sys_socket (sys/socket.h): Likewise.
+       * modules/sys_stat (sys/stat.h): Likewise.
+       * modules/sysexits (sysexits.h): Likewise.
+       * modules/unistd (unistd.h): Likewise.
+
 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * modules/closein-tests (Makefile.am): Distribute
 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * modules/closein-tests (Makefile.am): Distribute
index 3fa848058f748f28f062c73884015597cd2b2e43..371aeacdcf51da1da0a6e90860d0b81973e4a7e0 100644 (file)
 #ifndef _GL_DIRENT_H
 #define _GL_DIRENT_H
 
 #ifndef _GL_DIRENT_H
 #define _GL_DIRENT_H
 
-#include @ABSOLUTE_DIRENT_H@
-
+#if @HAVE_INCLUDE_NEXT@
+# include_next <dirent.h>
+#else
+# include @ABSOLUTE_DIRENT_H@
+#endif
 
 /* Declare overridden functions.  */
 
 
 /* Declare overridden functions.  */
 
index 9d4ecefe46649ce020af3eccf1ed5fb2920e9e53..a980e40855a1418ae74002d28c51fe527eaf01fa 100644 (file)
 #ifndef _GL_ICONV_H
 #define _GL_ICONV_H
 
 #ifndef _GL_ICONV_H
 #define _GL_ICONV_H
 
-#include @ABSOLUTE_ICONV_H@
-
+#if @HAVE_INCLUDE_NEXT@
+# include_next <iconv.h>
+#else
+# include @ABSOLUTE_ICONV_H@
+#endif
 
 #ifdef __cplusplus
 extern "C" {
 
 #ifdef __cplusplus
 extern "C" {
index 7d7d25cf86e0026992cf36e00ecc8c10d31a1859..e23bd014a87c3276a7202e714e7533b0ba644e2b 100644 (file)
 #ifndef _GL_LOCALE_H
 #define _GL_LOCALE_H
 
 #ifndef _GL_LOCALE_H
 #define _GL_LOCALE_H
 
-#include @ABSOLUTE_LOCALE_H@
+#if @HAVE_INCLUDE_NEXT@
+# include_next <locale.h>
+#else
+# include @ABSOLUTE_LOCALE_H@
+#endif
 
 /* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
    On systems that don't define it, use the same value as GNU libintl.  */
 
 /* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
    On systems that don't define it, use the same value as GNU libintl.  */
index 4a53605f5d91dea35995558d78d461a6c92f7bd5..d46ec78e9b66a8220edbc7f667dfe5abae88f426 100644 (file)
    <sys/types.h>.  */
 
 # include <sys/types.h>
    <sys/types.h>.  */
 
 # include <sys/types.h>
-# include @ABSOLUTE_NETINET_IN_H@
-
+# if @HAVE_INCLUDE_NEXT@
+#  include_next <netinet/in.h>
+# else
+#  include @ABSOLUTE_NETINET_IN_H@
+# endif
 #else
 
 /* A platform that lacks <netinet/in.h>.  */
 #else
 
 /* A platform that lacks <netinet/in.h>.  */
index d79de885e63a4fdec24114a6f62df7581a92ec19..c1c2a9e12d7916cac27ffd8f86141e03a41afc24 100644 (file)
    <sys/types.h>.  */
 
 # include <sys/types.h>
    <sys/types.h>.  */
 
 # include <sys/types.h>
-# include @ABSOLUTE_SYS_SELECT_H@
+
+# if @HAVE_INCLUDE_NEXT@
+#  include_next <sys/select.h>
+# else
+#  include @ABSOLUTE_SYS_SELECT_H@
+# endif
 
 #else
 
 
 #else
 
index 623c98c2f17b510c6c0e0169072d80f0db06f84b..7ad5bca09aff0948016c5aaf395f2260dc8b50d1 100644 (file)
    <sys/types.h>.  */
 
 # include <sys/types.h>
    <sys/types.h>.  */
 
 # include <sys/types.h>
-# include @ABSOLUTE_SYS_SOCKET_H@
+
+# if @HAVE_INCLUDE_NEXT@
+#  include_next <sys/socket.h>
+# else
+#  include @ABSOLUTE_SYS_SOCKET_H@
+# endif
 
 #else
 
 
 #else
 
index 10d5b4cc0401c1feee207985ba9b8bda4f9c2feb..20bd5ae1e519b8a093a84e69d60d6b402ea256ac 100644 (file)
 /* This file is supposed to be used on platforms where <sys/stat.h> is
    incomplete.  It is intended to provide definitions and prototypes
    needed by an application.  Start with what the system provides.  */
 /* This file is supposed to be used on platforms where <sys/stat.h> is
    incomplete.  It is intended to provide definitions and prototypes
    needed by an application.  Start with what the system provides.  */
-#include @ABSOLUTE_SYS_STAT_H@
+
+#if @HAVE_INCLUDE_NEXT@
+# include_next <sys/stat.h>
+#else
+# include @ABSOLUTE_SYS_STAT_H@
+#endif
 
 #ifndef S_IFMT
 # define S_IFMT 0170000
 
 #ifndef S_IFMT
 # define S_IFMT 0170000
index 4fa6fcf4ce730c687604ee175bd8b1c6fce6ff2b..dc63ab344795511ca572189880c8c5bc0a5880f3 100644 (file)
 #  undef EX_OK
 # endif
 
 #  undef EX_OK
 # endif
 
-# include @ABSOLUTE_SYSEXITS_H@
+# if @HAVE_INCLUDE_NEXT@
+#  include_next <sysexits.h>
+# else
+#  include @ABSOLUTE_SYSEXITS_H@
+# endif
 
 /* HP-UX 11 <sysexits.h> ends at EX_NOPERM.  */
 # ifndef EX_CONFIG
 
 /* HP-UX 11 <sysexits.h> ends at EX_NOPERM.  */
 # ifndef EX_CONFIG
index 9beffce1fcf55ce96c3ccea0dabd624428a0d53f..1fce5095e601012cc4dd7efae19443a42da16f77 100644 (file)
 #define _GL_UNISTD_H
 
 #if @HAVE_UNISTD_H@
 #define _GL_UNISTD_H
 
 #if @HAVE_UNISTD_H@
-# include @ABSOLUTE_UNISTD_H@
+# if @HAVE_INCLUDE_NEXT@
+#  include_next <unistd.h>
+# else
+#  include @ABSOLUTE_UNISTD_H@
+# endif
 #endif
 
 /* mingw doesn't define the SEEK_* macros in <unistd.h>.  */
 #endif
 
 /* mingw doesn't define the SEEK_* macros in <unistd.h>.  */
index d64766834173ade5e568d58e77aa42b29663a86b..c2b94b0f638c3a8b315066a166effbc078286f95 100644 (file)
@@ -28,6 +28,7 @@ dirent.h: dirent_.h
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_DIRENT_H''@|$(ABSOLUTE_DIRENT_H)|g' \
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_DIRENT_H''@|$(ABSOLUTE_DIRENT_H)|g' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
              < $(srcdir)/dirent_.h; \
        } > $@-t
              -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
              < $(srcdir)/dirent_.h; \
        } > $@-t
@@ -42,4 +43,3 @@ LGPL
 
 Maintainer:
 Bruno Haible
 
 Maintainer:
 Bruno Haible
-
index 28e936d3937e715a8ab1e3e0aa877f59cfee79ee..7525ed1f50923841da26d45374f2d678e54c18e7 100644 (file)
@@ -29,6 +29,7 @@ iconv.h: iconv_.h
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''ABSOLUTE_ICONV_H''@|$(ABSOLUTE_ICONV_H)|g' \
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''ABSOLUTE_ICONV_H''@|$(ABSOLUTE_ICONV_H)|g' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              -e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
              < $(srcdir)/iconv_.h; \
        } > $@-t
              -e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
              < $(srcdir)/iconv_.h; \
        } > $@-t
@@ -61,4 +62,3 @@ LGPL
 
 Maintainer:
 Bruno Haible
 
 Maintainer:
 Bruno Haible
-
index 2110f15dde06f3798bca6191e8d59e721869ffeb..74bcea1785bee09d273c7ab46b250bcf2d8b58d3 100644 (file)
@@ -20,6 +20,7 @@ locale.h: locale_.h
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''ABSOLUTE_LOCALE_H''@|$(ABSOLUTE_LOCALE_H)|g' \
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''ABSOLUTE_LOCALE_H''@|$(ABSOLUTE_LOCALE_H)|g' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              < $(srcdir)/locale_.h; \
        } > $@-t
        mv $@-t $@
              < $(srcdir)/locale_.h; \
        } > $@-t
        mv $@-t $@
@@ -33,4 +34,3 @@ LGPL
 
 Maintainer:
 Bruno Haible
 
 Maintainer:
 Bruno Haible
-
index af836befa916586443519ccec8811da8561782e8..a4eeb438fbd7722dbd08fddd1c531c79a2a4af40 100644 (file)
@@ -23,6 +23,7 @@ netinet/in.h:
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_NETINET_IN_H''@|$(ABSOLUTE_NETINET_IN_H)|g' \
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_NETINET_IN_H''@|$(ABSOLUTE_NETINET_IN_H)|g' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \
              < $(srcdir)/netinet_in_.h; \
        } > $@-t
              -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \
              < $(srcdir)/netinet_in_.h; \
        } > $@-t
index f182f2658f1f26668f32d2c288449c2153449761..68f79185bd76f4d3f4ed2d9b9deccae486417203 100644 (file)
@@ -23,6 +23,7 @@ sys/select.h:
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_SYS_SELECT_H''@|$(ABSOLUTE_SYS_SELECT_H)|g' \
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_SYS_SELECT_H''@|$(ABSOLUTE_SYS_SELECT_H)|g' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
              < $(srcdir)/sys_select_.h; \
        } > $@-t
              -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
              < $(srcdir)/sys_select_.h; \
        } > $@-t
index 5b36b0cfe14c33a53e81e0160d8b0f82f67cb179..3a6cd455a013d603cd6fe0fb73fd9c7ecb5f42ed 100644 (file)
@@ -22,6 +22,7 @@ sys/socket.h: sys_socket_.h
        @MKDIR_P@ sys
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_SYS_SOCKET_H''@|$(ABSOLUTE_SYS_SOCKET_H)|g' \
        @MKDIR_P@ sys
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_SYS_SOCKET_H''@|$(ABSOLUTE_SYS_SOCKET_H)|g' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
              -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
index fcf4c8aeaad413d25a88e1d2e7661e58e62c12b0..4a981ce48111624406a4da8b244d06afdda7ed96 100644 (file)
@@ -22,6 +22,7 @@ sys/stat.h: sys_stat_.h
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              -e 's|@''HAVE_IO_H''@|$(HAVE_IO_H)|g' \
              -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
              -e 's|@''HAVE_DECL_MKDIR''@|$(HAVE_DECL_MKDIR)|g' \
              -e 's|@''HAVE_IO_H''@|$(HAVE_IO_H)|g' \
              -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
              -e 's|@''HAVE_DECL_MKDIR''@|$(HAVE_DECL_MKDIR)|g' \
index d737e3a319148558ecb341213be524ca96189c02..cb68f8eedc565343da27d0cd588390308786dc82 100644 (file)
@@ -20,6 +20,7 @@ sysexits.h: sysexits_.h
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \
              -e 's|@''ABSOLUTE_SYSEXITS_H''@|$(ABSOLUTE_SYSEXITS_H)|g' \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \
              -e 's|@''ABSOLUTE_SYSEXITS_H''@|$(ABSOLUTE_SYSEXITS_H)|g' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              < $(srcdir)/sysexits_.h; \
        } > $@-t
        mv -f $@-t $@
              < $(srcdir)/sysexits_.h; \
        } > $@-t
        mv -f $@-t $@
index 58a6c21dc7278058c7d22d6b133f5d3fbb0f9c40..afb7a89c2d9ff87a74ec72a5d1bc5aacff0da763 100644 (file)
@@ -22,6 +22,7 @@ unistd.h: unistd_.h
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
              -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
              -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
              -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
              -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
              -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
              -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
              -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \