* 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 b0bc1bb..90f1911 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
index 3fa8480..371aeac 100644 (file)
 #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.  */
 
index 9d4ecef..a980e40 100644 (file)
 #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" {
index 7d7d25c..e23bd01 100644 (file)
 #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.  */
index 4a53605..d46ec78 100644 (file)
    <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>.  */
index d79de88..c1c2a9e 100644 (file)
    <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
 
index 623c98c..7ad5bca 100644 (file)
    <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
 
index 10d5b4c..20bd5ae 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.  */
-#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
index 4fa6fcf..dc63ab3 100644 (file)
 #  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
index 9beffce..1fce509 100644 (file)
 #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>.  */
index d647668..c2b94b0 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' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
              < $(srcdir)/dirent_.h; \
        } > $@-t
@@ -42,4 +43,3 @@ LGPL
 
 Maintainer:
 Bruno Haible
-
index 28e936d..7525ed1 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' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              -e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
              < $(srcdir)/iconv_.h; \
        } > $@-t
@@ -61,4 +62,3 @@ LGPL
 
 Maintainer:
 Bruno Haible
-
index 2110f15..74bcea1 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' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              < $(srcdir)/locale_.h; \
        } > $@-t
        mv $@-t $@
@@ -33,4 +34,3 @@ LGPL
 
 Maintainer:
 Bruno Haible
-
index af836be..a4eeb43 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' \
+             -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
index f182f26..68f7918 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' \
+             -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
index 5b36b0c..3a6cd45 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' \
+             -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' \
index fcf4c8a..4a981ce 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' \
+             -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' \
index d737e3a..cb68f8e 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' \
+             -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \
              < $(srcdir)/sysexits_.h; \
        } > $@-t
        mv -f $@-t $@
index 58a6c21..afb7a89 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' \
+             -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' \