bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more #include_next patches for iconv_open, netinet_in, sys_stat, etc.


From: Paul Eggert
Subject: more #include_next patches for iconv_open, netinet_in, sys_stat, etc.
Date: Wed, 16 May 2007 23:30:37 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

This is a followup to my previous message about using #include_next to
fix problems I'm having with GCC 4.2.0 on Debian stable.

Bruno, are the following #include_next patches to fchdir, iconv_open,
and locale OK with you?

Simon, are the following #include_next patches to netinet_in, sys_select,
sys_socket, sysexits, and unistd OK with you?

Eric, are the following #include_next patches to sys_stat OK with you?

2007-05-16  Paul Eggert  <address@hidden>

        * lib/dirent_.h: Prefer #include_next <foo.h> to #include
        @ABSOLUTE_FOO_H@ if @address@hidden  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 @address@hidden
        * 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.

Index: lib/dirent_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/dirent_.h,v
retrieving revision 1.2
diff -u -p -r1.2 dirent_.h
--- lib/dirent_.h       19 Feb 2007 02:24:42 -0000      1.2
+++ lib/dirent_.h       17 May 2007 06:24:59 -0000
@@ -18,8 +18,11 @@
 #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: lib/iconv_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/iconv_.h,v
retrieving revision 1.1
diff -u -p -r1.1 iconv_.h
--- lib/iconv_.h        31 Mar 2007 21:00:19 -0000      1.1
+++ lib/iconv_.h        17 May 2007 06:24:59 -0000
@@ -19,8 +19,11 @@
 #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: lib/locale_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/locale_.h,v
retrieving revision 1.1
diff -u -p -r1.1 locale_.h
--- lib/locale_.h       10 Apr 2007 23:41:17 -0000      1.1
+++ lib/locale_.h       17 May 2007 06:24:59 -0000
@@ -18,7 +18,11 @@
 #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: lib/netinet_in_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/netinet_in_.h,v
retrieving revision 1.1
diff -u -p -r1.1 netinet_in_.h
--- lib/netinet_in_.h   7 Mar 2007 23:11:37 -0000       1.1
+++ lib/netinet_in_.h   17 May 2007 06:24:59 -0000
@@ -24,8 +24,11 @@
    <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: lib/sys_select_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/sys_select_.h,v
retrieving revision 1.1
diff -u -p -r1.1 sys_select_.h
--- lib/sys_select_.h   7 Mar 2007 23:08:22 -0000       1.1
+++ lib/sys_select_.h   17 May 2007 06:24:59 -0000
@@ -24,7 +24,12 @@
    <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: lib/sys_socket_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/sys_socket_.h,v
retrieving revision 1.1
diff -u -p -r1.1 sys_socket_.h
--- lib/sys_socket_.h   27 Apr 2007 18:19:55 -0000      1.1
+++ lib/sys_socket_.h   17 May 2007 06:24:59 -0000
@@ -30,7 +30,12 @@
    <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: lib/sys_stat_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/sys_stat_.h,v
retrieving revision 1.2
diff -u -p -r1.2 sys_stat_.h
--- lib/sys_stat_.h     1 May 2007 18:14:44 -0000       1.2
+++ lib/sys_stat_.h     17 May 2007 06:24:59 -0000
@@ -23,7 +23,12 @@
 /* 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: lib/sysexits_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/sysexits_.h,v
retrieving revision 1.1
diff -u -p -r1.1 sysexits_.h
--- lib/sysexits_.h     27 Apr 2007 18:22:23 -0000      1.1
+++ lib/sysexits_.h     17 May 2007 06:24:59 -0000
@@ -30,7 +30,11 @@
 #  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: lib/unistd_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/unistd_.h,v
retrieving revision 1.7
diff -u -p -r1.7 unistd_.h
--- lib/unistd_.h       1 May 2007 22:15:01 -0000       1.7
+++ lib/unistd_.h       17 May 2007 06:24:59 -0000
@@ -19,7 +19,11 @@
 #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: modules/fchdir
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/fchdir,v
retrieving revision 1.5
diff -u -p -r1.5 fchdir
--- modules/fchdir      19 Feb 2007 02:24:42 -0000      1.5
+++ modules/fchdir      17 May 2007 06:24:59 -0000
@@ -28,6 +28,7 @@ dirent.h: dirent_.h
        rm -f address@hidden $@
        { 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; \
        } > address@hidden
@@ -42,4 +43,3 @@ LGPL

 Maintainer:
 Bruno Haible
-
Index: modules/iconv_open
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/iconv_open,v
retrieving revision 1.2
diff -u -p -r1.2 iconv_open
--- modules/iconv_open  4 Apr 2007 00:14:26 -0000       1.2
+++ modules/iconv_open  17 May 2007 06:24:59 -0000
@@ -29,6 +29,7 @@ iconv.h: iconv_.h
        rm -f address@hidden $@
        { 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; \
        } > address@hidden
@@ -61,4 +62,3 @@ LGPL

 Maintainer:
 Bruno Haible
-
Index: modules/locale
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/locale,v
retrieving revision 1.1
diff -u -p -r1.1 locale
--- modules/locale      10 Apr 2007 23:41:17 -0000      1.1
+++ modules/locale      17 May 2007 06:24:59 -0000
@@ -20,6 +20,7 @@ locale.h: locale_.h
        rm -f address@hidden $@
        { 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; \
        } > address@hidden
        mv address@hidden $@
@@ -33,4 +34,3 @@ LGPL

 Maintainer:
 Bruno Haible
-
Index: modules/netinet_in
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/netinet_in,v
retrieving revision 1.7
diff -u -p -r1.7 netinet_in
--- modules/netinet_in  7 Mar 2007 23:11:37 -0000       1.7
+++ modules/netinet_in  17 May 2007 06:24:59 -0000
@@ -23,6 +23,7 @@ netinet/in.h:
        rm -f address@hidden $@
        { 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; \
        } > address@hidden
Index: modules/sys_select
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/sys_select,v
retrieving revision 1.8
diff -u -p -r1.8 sys_select
--- modules/sys_select  7 Mar 2007 23:08:22 -0000       1.8
+++ modules/sys_select  17 May 2007 06:24:59 -0000
@@ -23,6 +23,7 @@ sys/select.h:
        rm -f address@hidden $@
        { 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; \
        } > address@hidden
Index: modules/sys_socket
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/sys_socket,v
retrieving revision 1.13
diff -u -p -r1.13 sys_socket
--- modules/sys_socket  27 Apr 2007 18:20:56 -0000      1.13
+++ modules/sys_socket  17 May 2007 06:24:59 -0000
@@ -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: modules/sys_stat
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/sys_stat,v
retrieving revision 1.14
diff -u -p -r1.14 sys_stat
--- modules/sys_stat    1 May 2007 18:14:44 -0000       1.14
+++ modules/sys_stat    17 May 2007 06:24:59 -0000
@@ -22,6 +22,7 @@ sys/stat.h: sys_stat_.h
        rm -f address@hidden $@
        { 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: modules/sysexits
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/sysexits,v
retrieving revision 1.14
diff -u -p -r1.14 sysexits
--- modules/sysexits    27 Apr 2007 18:23:01 -0000      1.14
+++ modules/sysexits    17 May 2007 06:24:59 -0000
@@ -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; \
        } > address@hidden
        mv -f address@hidden $@
Index: modules/unistd
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/unistd,v
retrieving revision 1.8
diff -u -p -r1.8 unistd
--- modules/unistd      1 May 2007 22:15:02 -0000       1.8
+++ modules/unistd      17 May 2007 06:24:59 -0000
@@ -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' \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]