[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FreeBSD GCC warnings
From: |
Bruno Haible |
Subject: |
Re: FreeBSD GCC warnings |
Date: |
Sat, 18 Oct 2008 02:46:13 +0200 |
User-agent: |
KMail/1.5.4 |
> ! PRAGMA_SYSTEM_HEADER='#if __GNUC__ >= 3
> ! #pragma GCC system_header
> ! #endif'
Oops, that did not work. autoconf >= 2.60 supports multiline replacements
in AC_SUBST, but 'automake' and 'make' don't. I've reverted the commit and
done this instead:
2008-10-17 Bruno Haible <address@hidden>
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
* lib/arpa_inet.in.h: Encloses reference to PRAGMA_SYSTEM_HEADER so
that it gets activated only for gcc >= 3.0.
* lib/dirent.in.h: Likewise.
* lib/errno.in.h: Likewise.
* lib/fcntl.in.h: Likewise.
* lib/float.in.h: Likewise.
* lib/iconv.in.h: Likewise.
* lib/inttypes.in.h: Likewise.
* lib/locale.in.h: Likewise.
* lib/math.in.h: Likewise.
* lib/netdb.in.h: Likewise.
* lib/netinet_in.in.h: Likewise.
* lib/search.in.h: Likewise.
* lib/signal.in.h: Likewise.
* lib/spawn.in.h: Likewise.
* lib/stdarg.in.h: Likewise.
* lib/stdint.in.h: Likewise.
* lib/stdio.in.h: Likewise.
* lib/stdlib.in.h: Likewise.
* lib/string.in.h: Likewise.
* lib/strings.in.h: Likewise.
* lib/sys_file.in.h: Likewise.
* lib/sys_ioctl.in.h: Likewise.
* lib/sys_select.in.h: Likewise.
* lib/sys_socket.in.h: Likewise.
* lib/sys_stat.in.h: Likewise.
* lib/sys_time.in.h: Likewise.
* lib/sysexits.in.h: Likewise.
* lib/time.in.h: Likewise.
* lib/unistd.in.h: Likewise.
* lib/wchar.in.h: Likewise.
* lib/wctype.in.h: Likewise.
Reported by Yoann Vandoorselaere <address@hidden>.
--- lib/arpa_inet.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/arpa_inet.in.h 2008-10-18 02:35:09.000000000 +0200
@@ -24,7 +24,9 @@
#if @HAVE_ARPA_INET_H@
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@
--- lib/dirent.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/dirent.in.h 2008-10-18 02:29:41.000000000 +0200
@@ -16,7 +16,9 @@
#ifndef _GL_DIRENT_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_DIRENT_H@
--- lib/errno.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/errno.in.h 2008-10-18 02:29:44.000000000 +0200
@@ -18,7 +18,9 @@
#ifndef _GL_ERRNO_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_ERRNO_H@
--- lib/fcntl.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/fcntl.in.h 2008-10-18 02:29:46.000000000 +0200
@@ -17,7 +17,9 @@
/* written by Paul Eggert */
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#if defined __need_system_fcntl_h
/* Special invocation convention. */
--- lib/float.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/float.in.h 2008-10-18 02:29:48.000000000 +0200
@@ -17,7 +17,9 @@
#ifndef _GL_FLOAT_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_FLOAT_H@
--- lib/iconv.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/iconv.in.h 2008-10-18 02:29:51.000000000 +0200
@@ -18,7 +18,9 @@
#ifndef _GL_ICONV_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_ICONV_H@
--- lib/inttypes.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/inttypes.in.h 2008-10-18 02:35:47.000000000 +0200
@@ -26,7 +26,9 @@
The include_next requires a split double-inclusion guard. */
#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
# if @HAVE_INTTYPES_H@
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
# @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
# endif
#endif
--- lib/locale.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/locale.in.h 2008-10-18 02:30:02.000000000 +0200
@@ -16,7 +16,9 @@
#ifndef _GL_LOCALE_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_LOCALE_H@
--- lib/math.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/math.in.h 2008-10-18 02:30:07.000000000 +0200
@@ -17,7 +17,9 @@
#ifndef _GL_MATH_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_MATH_H@
--- lib/netdb.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/netdb.in.h 2008-10-18 02:35:57.000000000 +0200
@@ -24,7 +24,9 @@
#if @HAVE_NETDB_H@
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_NETDB_H@
--- lib/netinet_in.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/netinet_in.in.h 2008-10-18 02:36:05.000000000 +0200
@@ -19,7 +19,9 @@
#if @HAVE_NETINET_IN_H@
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
/* On many platforms, <netinet/in.h> assumes prior inclusion of
<sys/types.h>. */
--- lib/search.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/search.in.h 2008-10-18 02:36:13.000000000 +0200
@@ -19,7 +19,9 @@
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_SEARCH_H@
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
# @INCLUDE_NEXT@ @NEXT_SEARCH_H@
#endif
--- lib/signal.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/signal.in.h 2008-10-18 02:30:23.000000000 +0200
@@ -15,7 +15,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#if defined __need_sig_atomic_t || defined __need_sigset_t
/* Special invocation convention inside glibc header files. */
--- lib/spawn.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/spawn.in.h 2008-10-18 02:30:25.000000000 +0200
@@ -17,7 +17,9 @@
#ifndef _GL_SPAWN_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_SPAWN_H@
--- lib/stdarg.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/stdarg.in.h 2008-10-18 02:30:28.000000000 +0200
@@ -17,7 +17,9 @@
#ifndef _GL_STDARG_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_STDARG_H@
--- lib/stdint.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/stdint.in.h 2008-10-18 02:37:40.000000000 +0200
@@ -49,7 +49,9 @@
in <inttypes.h> would reinclude us, skipping our contents because
_GL_STDINT_H is defined.
The include_next requires a split double-inclusion guard. */
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
# @INCLUDE_NEXT@ @NEXT_STDINT_H@
#endif
--- lib/stdio.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/stdio.in.h 2008-10-18 02:30:39.000000000 +0200
@@ -16,7 +16,9 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#if defined __need_FILE || defined __need___FILE
/* Special invocation convention inside glibc header files. */
--- lib/stdlib.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/stdlib.in.h 2008-10-18 02:30:41.000000000 +0200
@@ -15,7 +15,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#if defined __need_malloc_and_calloc
/* Special invocation convention inside glibc header files. */
--- lib/string.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/string.in.h 2008-10-18 02:30:44.000000000 +0200
@@ -18,7 +18,9 @@
#ifndef _GL_STRING_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_STRING_H@
--- lib/strings.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/strings.in.h 2008-10-18 02:30:46.000000000 +0200
@@ -18,7 +18,9 @@
#ifndef _GL_STRINGS_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_STRINGS_H@
--- lib/sys_file.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/sys_file.in.h 2008-10-18 02:36:42.000000000 +0200
@@ -19,7 +19,9 @@
/* Written by Richard W.M. Jones. */
#ifndef _GL_SYS_FILE_H
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
/* The include_next requires a split double-inclusion guard. */
# if @HAVE_SYS_FILE_H@
--- lib/sys_ioctl.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/sys_ioctl.in.h 2008-10-18 02:30:51.000000000 +0200
@@ -17,7 +17,9 @@
#ifndef _GL_SYS_IOCTL_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_SYS_IOCTL_H@
--- lib/sys_select.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/sys_select.in.h 2008-10-18 02:36:56.000000000 +0200
@@ -19,7 +19,9 @@
#if @HAVE_SYS_SELECT_H@
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
/* On many platforms, <sys/select.h> assumes prior inclusion of
<sys/types.h>. */
--- lib/sys_socket.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/sys_socket.in.h 2008-10-18 02:37:05.000000000 +0200
@@ -27,7 +27,9 @@
#if @HAVE_SYS_SOCKET_H@
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
/* On many platforms, <sys/socket.h> assumes prior inclusion of
<sys/types.h>. */
--- lib/sys_stat.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/sys_stat.in.h 2008-10-18 02:30:59.000000000 +0200
@@ -23,7 +23,9 @@
#ifndef _GL_SYS_STAT_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
address@hidden@ @NEXT_SYS_STAT_H@
--- lib/sys_time.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/sys_time.in.h 2008-10-18 02:31:01.000000000 +0200
@@ -18,7 +18,9 @@
/* Written by Paul Eggert. */
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#if defined _GL_SYS_TIME_H
--- lib/sysexits.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/sysexits.in.h 2008-10-18 02:37:18.000000000 +0200
@@ -20,7 +20,9 @@
#if @HAVE_SYSEXITS_H@
+# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+# endif
/* IRIX 6.5 has an <unistd.h> that defines a macro EX_OK with a nonzero
value. Override it. See
--- lib/time.in.h.orig 2008-10-18 02:38:01.000000000 +0200
+++ lib/time.in.h 2008-10-18 02:31:07.000000000 +0200
@@ -16,7 +16,9 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* Don't get in the way of glibc when it includes time.h merely to
declare a few standard symbols, rather than to declare all the
--- lib/unistd.in.h.orig 2008-10-18 02:38:02.000000000 +0200
+++ lib/unistd.in.h 2008-10-18 02:31:09.000000000 +0200
@@ -17,7 +17,9 @@
#ifndef _GL_UNISTD_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_UNISTD_H@
--- lib/wchar.in.h.orig 2008-10-18 02:38:02.000000000 +0200
+++ lib/wchar.in.h 2008-10-18 02:31:12.000000000 +0200
@@ -26,7 +26,9 @@
* the declaration of wcwidth().
*/
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#ifdef __need_mbstate_t
/* Special invocation convention inside uClibc header files. */
--- lib/wctype.in.h.orig 2008-10-18 02:38:02.000000000 +0200
+++ lib/wctype.in.h 2008-10-18 02:31:15.000000000 +0200
@@ -28,7 +28,9 @@
#ifndef _GL_WCTYPE_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#if @HAVE_WINT_T@
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.