+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
#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. */
#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" {
#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. */
<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>. */
<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
<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
/* 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
# 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
#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>. */
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
Maintainer:
Bruno Haible
-
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
Maintainer:
Bruno Haible
-
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 $@
Maintainer:
Bruno Haible
-
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
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
@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' \
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' \
{ 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 $@
{ 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' \