From: Paul Eggert Date: Thu, 17 May 2007 15:56:05 +0000 (+0000) Subject: * lib/dirent_.h: Prefer #include_next to #include X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af36a1d14d56f565ba2ffc4edf046b579c2b9148;p=pspp * lib/dirent_.h: Prefer #include_next 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. --- diff --git a/ChangeLog b/ChangeLog index b0bc1bb291..90f1911c6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2007-05-17 Paul Eggert + + * lib/dirent_.h: Prefer #include_next 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 * modules/closein-tests (Makefile.am): Distribute diff --git a/lib/dirent_.h b/lib/dirent_.h index 3fa848058f..371aeacdcf 100644 --- a/lib/dirent_.h +++ b/lib/dirent_.h @@ -18,8 +18,11 @@ #ifndef _GL_DIRENT_H #define _GL_DIRENT_H -#include @ABSOLUTE_DIRENT_H@ - +#if @HAVE_INCLUDE_NEXT@ +# include_next +#else +# include @ABSOLUTE_DIRENT_H@ +#endif /* Declare overridden functions. */ diff --git a/lib/iconv_.h b/lib/iconv_.h index 9d4ecefe46..a980e40855 100644 --- a/lib/iconv_.h +++ b/lib/iconv_.h @@ -19,8 +19,11 @@ #ifndef _GL_ICONV_H #define _GL_ICONV_H -#include @ABSOLUTE_ICONV_H@ - +#if @HAVE_INCLUDE_NEXT@ +# include_next +#else +# include @ABSOLUTE_ICONV_H@ +#endif #ifdef __cplusplus extern "C" { diff --git a/lib/locale_.h b/lib/locale_.h index 7d7d25cf86..e23bd014a8 100644 --- a/lib/locale_.h +++ b/lib/locale_.h @@ -18,7 +18,11 @@ #ifndef _GL_LOCALE_H #define _GL_LOCALE_H -#include @ABSOLUTE_LOCALE_H@ +#if @HAVE_INCLUDE_NEXT@ +# include_next +#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. */ diff --git a/lib/netinet_in_.h b/lib/netinet_in_.h index 4a53605f5d..d46ec78e9b 100644 --- a/lib/netinet_in_.h +++ b/lib/netinet_in_.h @@ -24,8 +24,11 @@ . */ # include -# include @ABSOLUTE_NETINET_IN_H@ - +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_NETINET_IN_H@ +# endif #else /* A platform that lacks . */ diff --git a/lib/sys_select_.h b/lib/sys_select_.h index d79de885e6..c1c2a9e12d 100644 --- a/lib/sys_select_.h +++ b/lib/sys_select_.h @@ -24,7 +24,12 @@ . */ # include -# include @ABSOLUTE_SYS_SELECT_H@ + +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_SYS_SELECT_H@ +# endif #else diff --git a/lib/sys_socket_.h b/lib/sys_socket_.h index 623c98c2f1..7ad5bca09a 100644 --- a/lib/sys_socket_.h +++ b/lib/sys_socket_.h @@ -30,7 +30,12 @@ . */ # include -# include @ABSOLUTE_SYS_SOCKET_H@ + +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_SYS_SOCKET_H@ +# endif #else diff --git a/lib/sys_stat_.h b/lib/sys_stat_.h index 10d5b4cc04..20bd5ae1e5 100644 --- a/lib/sys_stat_.h +++ b/lib/sys_stat_.h @@ -23,7 +23,12 @@ /* This file is supposed to be used on platforms where 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 +#else +# include @ABSOLUTE_SYS_STAT_H@ +#endif #ifndef S_IFMT # define S_IFMT 0170000 diff --git a/lib/sysexits_.h b/lib/sysexits_.h index 4fa6fcf4ce..dc63ab3447 100644 --- a/lib/sysexits_.h +++ b/lib/sysexits_.h @@ -30,7 +30,11 @@ # undef EX_OK # endif -# include @ABSOLUTE_SYSEXITS_H@ +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_SYSEXITS_H@ +# endif /* HP-UX 11 ends at EX_NOPERM. */ # ifndef EX_CONFIG diff --git a/lib/unistd_.h b/lib/unistd_.h index 9beffce1fc..1fce5095e6 100644 --- a/lib/unistd_.h +++ b/lib/unistd_.h @@ -19,7 +19,11 @@ #define _GL_UNISTD_H #if @HAVE_UNISTD_H@ -# include @ABSOLUTE_UNISTD_H@ +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_UNISTD_H@ +# endif #endif /* mingw doesn't define the SEEK_* macros in . */ diff --git a/modules/fchdir b/modules/fchdir index d647668341..c2b94b0f63 100644 --- a/modules/fchdir +++ b/modules/fchdir @@ -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 - diff --git a/modules/iconv_open b/modules/iconv_open index 28e936d393..7525ed1f50 100644 --- a/modules/iconv_open +++ b/modules/iconv_open @@ -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 - diff --git a/modules/locale b/modules/locale index 2110f15dde..74bcea1785 100644 --- a/modules/locale +++ b/modules/locale @@ -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 - diff --git a/modules/netinet_in b/modules/netinet_in index af836befa9..a4eeb438fb 100644 --- a/modules/netinet_in +++ b/modules/netinet_in @@ -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 diff --git a/modules/sys_select b/modules/sys_select index f182f2658f..68f79185bd 100644 --- a/modules/sys_select +++ b/modules/sys_select @@ -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 diff --git a/modules/sys_socket b/modules/sys_socket index 5b36b0cfe1..3a6cd455a0 100644 --- a/modules/sys_socket +++ b/modules/sys_socket @@ -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' \ diff --git a/modules/sys_stat b/modules/sys_stat index fcf4c8aeaa..4a981ce481 100644 --- a/modules/sys_stat +++ b/modules/sys_stat @@ -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' \ diff --git a/modules/sysexits b/modules/sysexits index d737e3a319..cb68f8eedc 100644 --- a/modules/sysexits +++ b/modules/sysexits @@ -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 $@ diff --git a/modules/unistd b/modules/unistd index 58a6c21dc7..afb7a89c2d 100644 --- a/modules/unistd +++ b/modules/unistd @@ -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' \