From 40aa4775a4319d3a3e5a571e6c28feb1d8566adc Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 25 Mar 2010 16:28:02 -0600 Subject: [PATCH] maint: use pragma consistently across replacement headers Several headers set #pragma GCC system_header prior to checking any multiple inclusion guards; maintenance is easiest if all replacement headers follow the same paradigm. * lib/ctype.in.h (system_header): Hoist for consistent placement. * lib/dirent.in.h (system_header): Likewise. * lib/errno.in.h (system_header): Likewise. * lib/float.in.h (system_header): Likewise. * lib/getopt.in.h (system_header): Likewise. * lib/iconv.in.h (system_header): Likewise. * lib/inttypes.in.h (system_header): Likewise. * lib/langinfo.in.h (system_header): Likewise. * lib/locale.in.h (system_header): Likewise. * lib/math.in.h (system_header): Likewise. * lib/netdb.in.h (system_header): Likewise. * lib/netinet_in.in.h (system_header): Likewise. * lib/pty.in.h (system_header): Likewise. * lib/sched.in.h (system_header): Likewise. * lib/se-selinux.in.h (system_header): Likewise. * lib/search.in.h (system_header): Likewise. * lib/spawn.in.h (system_header): Likewise. * lib/stdarg.in.h (system_header): Likewise. * lib/stdint.in.h (system_header): Likewise. * lib/string.in.h (system_header): Likewise. * lib/strings.in.h (system_header): Likewise. * lib/sys_file.in.h (system_header): Likewise. * lib/sys_ioctl.in.h (system_header): Likewise. * lib/sys_socket.in.h (system_header): Likewise. * lib/sys_times.in.h (system_header): Likewise. * lib/sys_utsname.in.h (system_header): Likewise. * lib/sys_wait.in.h (system_header): Likewise. * lib/sysexits.in.h (system_header): Likewise. * lib/unistd.in.h (system_header): Likewise. * lib/wctype.in.h (system_header): Likewise. Signed-off-by: Eric Blake --- ChangeLog | 34 +++++++++++++++++++++++++++++++++- lib/ctype.in.h | 4 ++-- lib/dirent.in.h | 4 ++-- lib/errno.in.h | 4 ++-- lib/float.in.h | 4 ++-- lib/getopt.in.h | 4 ++-- lib/iconv.in.h | 4 ++-- lib/inttypes.in.h | 7 ++++--- lib/langinfo.in.h | 4 ++-- lib/locale.in.h | 4 ++-- lib/math.in.h | 4 ++-- lib/netdb.in.h | 8 ++++---- lib/netinet_in.in.h | 8 ++++---- lib/pty.in.h | 4 ++-- lib/sched.in.h | 4 ++-- lib/se-selinux.in.h | 24 ++++++++++++++++++++---- lib/search.in.h | 7 ++++--- lib/spawn.in.h | 4 ++-- lib/stdarg.in.h | 4 ++-- lib/stdint.in.h | 7 ++++--- lib/string.in.h | 4 ++-- lib/strings.in.h | 4 ++-- lib/sys_file.in.h | 3 ++- lib/sys_ioctl.in.h | 4 ++-- lib/sys_socket.in.h | 8 ++++---- lib/sys_times.in.h | 4 ++-- lib/sys_utsname.in.h | 4 ++-- lib/sys_wait.in.h | 4 ++-- lib/sysexits.in.h | 8 ++++---- lib/unistd.in.h | 8 ++++---- lib/wctype.in.h | 4 ++-- 31 files changed, 127 insertions(+), 75 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1e075f05..5b11d6212 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,37 @@ 2010-03-25 Eric Blake + maint: use pragma consistently across replacement headers + * lib/ctype.in.h (system_header): Hoist for consistent placement. + * lib/dirent.in.h (system_header): Likewise. + * lib/errno.in.h (system_header): Likewise. + * lib/float.in.h (system_header): Likewise. + * lib/getopt.in.h (system_header): Likewise. + * lib/iconv.in.h (system_header): Likewise. + * lib/inttypes.in.h (system_header): Likewise. + * lib/langinfo.in.h (system_header): Likewise. + * lib/locale.in.h (system_header): Likewise. + * lib/math.in.h (system_header): Likewise. + * lib/netdb.in.h (system_header): Likewise. + * lib/netinet_in.in.h (system_header): Likewise. + * lib/pty.in.h (system_header): Likewise. + * lib/sched.in.h (system_header): Likewise. + * lib/se-selinux.in.h (system_header): Likewise. + * lib/search.in.h (system_header): Likewise. + * lib/spawn.in.h (system_header): Likewise. + * lib/stdarg.in.h (system_header): Likewise. + * lib/stdint.in.h (system_header): Likewise. + * lib/string.in.h (system_header): Likewise. + * lib/strings.in.h (system_header): Likewise. + * lib/sys_file.in.h (system_header): Likewise. + * lib/sys_ioctl.in.h (system_header): Likewise. + * lib/sys_socket.in.h (system_header): Likewise. + * lib/sys_times.in.h (system_header): Likewise. + * lib/sys_utsname.in.h (system_header): Likewise. + * lib/sys_wait.in.h (system_header): Likewise. + * lib/sysexits.in.h (system_header): Likewise. + * lib/unistd.in.h (system_header): Likewise. + * lib/wctype.in.h (system_header): Likewise. + arpa/inet: fix mingw compilation warning * lib/arpa_inet.in.h (system_header): Hoist to be unconditional. Reported by Matthew Bolte. @@ -295,7 +327,7 @@ errno value in error message. 2010-03-20 Bruno Haible - Jim Meyering + Jim Meyering lchown: Avoid "unused variable" warning. * lib/lchown.c (rpl_lchown): Move variable 'st' into #if block. diff --git a/lib/ctype.in.h b/lib/ctype.in.h index ccf222d76..fdf9e1e55 100644 --- a/lib/ctype.in.h +++ b/lib/ctype.in.h @@ -23,12 +23,12 @@ * */ -#ifndef _GL_CTYPE_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_CTYPE_H + /* Include the original . */ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_CTYPE_H@ diff --git a/lib/dirent.in.h b/lib/dirent.in.h index 3989a2546..15d488b35 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -14,12 +14,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _GL_DIRENT_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_DIRENT_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_DIRENT_H@ diff --git a/lib/errno.in.h b/lib/errno.in.h index 9ac3a5b4e..f5166bcf6 100644 --- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -16,12 +16,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_ERRNO_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_ERRNO_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@ diff --git a/lib/float.in.h b/lib/float.in.h index caf822f1d..b4ea3436f 100644 --- a/lib/float.in.h +++ b/lib/float.in.h @@ -15,12 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _GL_FLOAT_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_FLOAT_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FLOAT_H@ diff --git a/lib/getopt.in.h b/lib/getopt.in.h index 57a8e8992..c90baa53c 100644 --- a/lib/getopt.in.h +++ b/lib/getopt.in.h @@ -16,12 +16,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _GL_GETOPT_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_GETOPT_H + /* The include_next requires a split double-inclusion guard. We must also inform the replacement unistd.h to not recursively use ; our definitions will be present soon enough. */ diff --git a/lib/iconv.in.h b/lib/iconv.in.h index c8f516b06..162d980de 100644 --- a/lib/iconv.in.h +++ b/lib/iconv.in.h @@ -16,12 +16,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_ICONV_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_ICONV_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ICONV_H@ diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index a732c697c..aef157daf 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h @@ -20,15 +20,16 @@ * */ +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif + /* Include the original if it exists, and if this file has not been included yet or if this file includes gnulib stdint.h which in turn includes this file. 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 diff --git a/lib/langinfo.in.h b/lib/langinfo.in.h index 54fa1af35..04834ce66 100644 --- a/lib/langinfo.in.h +++ b/lib/langinfo.in.h @@ -20,12 +20,12 @@ * */ -#ifndef _GL_LANGINFO_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_LANGINFO_H + /* The include_next requires a split double-inclusion guard. */ #if @HAVE_LANGINFO_H@ # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ diff --git a/lib/locale.in.h b/lib/locale.in.h index ad92d8f2b..26059bae3 100644 --- a/lib/locale.in.h +++ b/lib/locale.in.h @@ -14,12 +14,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _GL_LOCALE_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_LOCALE_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_LOCALE_H@ diff --git a/lib/math.in.h b/lib/math.in.h index 5aad1a8e9..dd7a63449 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -15,12 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _GL_MATH_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_MATH_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ diff --git a/lib/netdb.in.h b/lib/netdb.in.h index c7bc92920..461d12f4c 100644 --- a/lib/netdb.in.h +++ b/lib/netdb.in.h @@ -20,14 +20,14 @@ It is intended to provide definitions and prototypes needed by an application. */ -#ifndef _GL_NETDB_H - -#if @HAVE_NETDB_H@ - # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif +#ifndef _GL_NETDB_H + +#if @HAVE_NETDB_H@ + /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_NETDB_H@ diff --git a/lib/netinet_in.in.h b/lib/netinet_in.in.h index 114c66b0b..8e79bdb10 100644 --- a/lib/netinet_in.in.h +++ b/lib/netinet_in.in.h @@ -15,14 +15,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_NETINET_IN_H - -#if @HAVE_NETINET_IN_H@ - # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif +#ifndef _GL_NETINET_IN_H + +#if @HAVE_NETINET_IN_H@ + /* On many platforms, assumes prior inclusion of . */ # include diff --git a/lib/pty.in.h b/lib/pty.in.h index af98dfe2a..98106bb1d 100644 --- a/lib/pty.in.h +++ b/lib/pty.in.h @@ -15,12 +15,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_PTY_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_PTY_H + /* The include_next requires a split double-inclusion guard. */ #if @HAVE_PTY_H@ # @INCLUDE_NEXT@ @NEXT_PTY_H@ diff --git a/lib/sched.in.h b/lib/sched.in.h index a164133bb..bc280362d 100644 --- a/lib/sched.in.h +++ b/lib/sched.in.h @@ -14,12 +14,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _GL_SCHED_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_SCHED_H + /* The include_next requires a split double-inclusion guard. */ #if @HAVE_SCHED_H@ # @INCLUDE_NEXT@ @NEXT_SCHED_H@ diff --git a/lib/se-selinux.in.h b/lib/se-selinux.in.h index 76f7c1bff..d756b69bc 100644 --- a/lib/se-selinux.in.h +++ b/lib/se-selinux.in.h @@ -1,9 +1,25 @@ -#ifndef _GL_SELINUX_SELINUX_H -# define _GL_SELINUX_SELINUX_H +/* Replacement for platforms that lack it. + Copyright (C) 2008-2010 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ -# if __GNUC__ >= 3 +#if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ -# endif +#endif + +#ifndef _GL_SELINUX_SELINUX_H +# define _GL_SELINUX_SELINUX_H # if HAVE_SELINUX_SELINUX_H diff --git a/lib/search.in.h b/lib/search.in.h index d61f9e4cb..9689d58cc 100644 --- a/lib/search.in.h +++ b/lib/search.in.h @@ -15,13 +15,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif + #ifndef _GL_SEARCH_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 diff --git a/lib/spawn.in.h b/lib/spawn.in.h index cc8d9a9c4..6a15e5f3a 100644 --- a/lib/spawn.in.h +++ b/lib/spawn.in.h @@ -15,12 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _GL_SPAWN_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_SPAWN_H + /* The include_next requires a split double-inclusion guard. */ #if @HAVE_SPAWN_H@ # @INCLUDE_NEXT@ @NEXT_SPAWN_H@ diff --git a/lib/stdarg.in.h b/lib/stdarg.in.h index 9a8d02930..99fff3161 100644 --- a/lib/stdarg.in.h +++ b/lib/stdarg.in.h @@ -15,12 +15,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_STDARG_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_STDARG_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDARG_H@ diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 3e8ba9775..0979a9568 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -21,6 +21,10 @@ * */ +# if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +# endif + #ifndef _GL_STDINT_H /* When including a system file that in turn includes , @@ -49,9 +53,6 @@ in 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 diff --git a/lib/string.in.h b/lib/string.in.h index 4788a195e..4a98302c1 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -16,12 +16,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_STRING_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_STRING_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ diff --git a/lib/strings.in.h b/lib/strings.in.h index 093189921..e2487bcc0 100644 --- a/lib/strings.in.h +++ b/lib/strings.in.h @@ -16,12 +16,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_STRINGS_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_STRINGS_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRINGS_H@ diff --git a/lib/sys_file.in.h b/lib/sys_file.in.h index 77a7ccbe5..bf7600111 100644 --- a/lib/sys_file.in.h +++ b/lib/sys_file.in.h @@ -17,12 +17,13 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Richard W.M. Jones. */ -#ifndef _GL_SYS_FILE_H # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif +#ifndef _GL_SYS_FILE_H + /* The include_next requires a split double-inclusion guard. */ # if @HAVE_SYS_FILE_H@ # @INCLUDE_NEXT@ @NEXT_SYS_FILE_H@ diff --git a/lib/sys_ioctl.in.h b/lib/sys_ioctl.in.h index 511d2c5c5..eee3b57f1 100644 --- a/lib/sys_ioctl.in.h +++ b/lib/sys_ioctl.in.h @@ -15,12 +15,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_SYS_IOCTL_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_SYS_IOCTL_H + /* The include_next requires a split double-inclusion guard. */ #if @HAVE_SYS_IOCTL_H@ # @INCLUDE_NEXT@ @NEXT_SYS_IOCTL_H@ diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 006a90106..03579af8b 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -23,6 +23,10 @@ It is intended to provide definitions and prototypes needed by an application. */ +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif + #if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H /* Special invocation convention: - On Cygwin 1.5.x we have a sequence of nested includes @@ -41,10 +45,6 @@ # define _GL_ALREADY_INCLUDING_SYS_SOCKET_H -# if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -# endif - /* On many platforms, assumes prior inclusion of . */ # include diff --git a/lib/sys_times.in.h b/lib/sys_times.in.h index 57f3a7209..1b66bbdf9 100644 --- a/lib/sys_times.in.h +++ b/lib/sys_times.in.h @@ -20,12 +20,12 @@ /* This file is supposed to be used on platforms where is missing. */ -#ifndef _GL_SYS_TIMES_H - # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif +#ifndef _GL_SYS_TIMES_H + # if @HAVE_SYS_TIMES_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIMES_H@ # endif diff --git a/lib/sys_utsname.in.h b/lib/sys_utsname.in.h index c0dabccb2..2d576056c 100644 --- a/lib/sys_utsname.in.h +++ b/lib/sys_utsname.in.h @@ -15,12 +15,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_SYS_UTSNAME_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_SYS_UTSNAME_H + #if @HAVE_SYS_UTSNAME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_UTSNAME_H@ #endif diff --git a/lib/sys_wait.in.h b/lib/sys_wait.in.h index 6699c61f0..623c8d5e3 100644 --- a/lib/sys_wait.in.h +++ b/lib/sys_wait.in.h @@ -16,12 +16,12 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _GL_SYS_WAIT_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_SYS_WAIT_H + /* The include_next requires a split double-inclusion guard. */ #if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@ diff --git a/lib/sysexits.in.h b/lib/sysexits.in.h index 5d5a21937..b477111f2 100644 --- a/lib/sysexits.in.h +++ b/lib/sysexits.in.h @@ -16,14 +16,14 @@ /* Written by Simon Josefsson based on sysexits(3) man page */ +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif + #ifndef _GL_SYSEXITS_H #if @HAVE_SYSEXITS_H@ -# if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -# endif - /* IRIX 6.5 has an that defines a macro EX_OK with a nonzero value. Override it. See */ diff --git a/lib/unistd.in.h b/lib/unistd.in.h index a60d4835d..209ea8956 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -15,6 +15,10 @@ 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 + /* Special invocation convention: - On mingw, several headers, including , include , but we need to ensure that both the system and @@ -33,10 +37,6 @@ /* Normal invocation. */ #elif !defined _GL_UNISTD_H -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif - /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ diff --git a/lib/wctype.in.h b/lib/wctype.in.h index 801620306..400f25025 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -26,12 +26,12 @@ * wctrans_t, and wctype_t are not yet implemented. */ -#ifndef _GL_WCTYPE_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +#ifndef _GL_WCTYPE_H + #if @HAVE_WINT_T@ /* Solaris 2.5 has a bug: must be included before . Tru64 with Desktop Toolkit C has a bug: must be included before -- 2.11.0