2008-10-17 Bruno Haible <bruno@clisp.org>
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
- * m4/include_next.m4: Require autoconf >= 2.60.
- (gl_INCLUDE_NEXT): Use #pragma GCC system_header only for GCC 3.0 or
- newer.
+ * 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 <yoann.v@prelude-ids.com>.
2008-10-17 Jim Meyering <meyering@redhat.com>
#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@
#ifndef _GL_DIRENT_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_DIRENT_H@
#ifndef _GL_ERRNO_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
/* written by Paul Eggert */
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#if defined __need_system_fcntl_h
/* Special invocation convention. */
#ifndef _GL_FLOAT_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_FLOAT_H@
#ifndef _GL_ICONV_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_ICONV_H@
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
#ifndef _GL_LOCALE_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
#ifndef _GL_MATH_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_MATH_H@
#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@
#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>. */
/* 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
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. */
#ifndef _GL_SPAWN_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_SPAWN_H@
#ifndef _GL_STDARG_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STDARG_H@
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
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. */
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. */
#ifndef _GL_STRING_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STRING_H@
#ifndef _GL_STRINGS_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STRINGS_H@
/* 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@
#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@
#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>. */
#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>. */
#ifndef _GL_SYS_STAT_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
/* Written by Paul Eggert. */
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#if defined _GL_SYS_TIME_H
#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
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
#ifndef _GL_UNISTD_H
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_UNISTD_H@
* the declaration of wcwidth().
*/
+#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
+#endif
#ifdef __need_mbstate_t
/* Special invocation convention inside uClibc header files. */
#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>.
-# include_next.m4 serial 9
+# include_next.m4 serial 8
dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl From Paul Eggert and Derek Price.
-AC_PREREQ([2.60])
-
dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
dnl
dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
if test $gl_cv_have_include_next = yes; then
INCLUDE_NEXT=include_next
if test -n "$GCC"; then
- dnl GCC 3.0 or newer supports #pragma GCC system_header.
- PRAGMA_SYSTEM_HEADER='#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif'
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
fi
else
INCLUDE_NEXT=include