Commit 0ab583c0 authored by Bruno Haible's avatar Bruno Haible

Allow multiple gnulib generated include files to be combined.

* gnulib-tool (func_compute_include_guard_prefix): New function.
(func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Resolve also
${gl_include_guard_prefix} references.
(func_import, func_create_testdir): Invoke
func_compute_include_guard_prefix.
* lib/arpa_inet.in.h: Use the @GUARD_PREFIX@ placeholder.
* lib/ctype.in.h: Likewise.
* lib/dirent.in.h: Likewise.
* lib/errno.in.h: Likewise.
* lib/fcntl.in.h: Likewise.
* lib/float.in.h: Likewise.
* lib/getopt.in.h: Likewise.
* lib/iconv.in.h: Likewise.
* lib/langinfo.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/poll.in.h: Likewise.
* lib/pthread.in.h: Likewise.
* lib/pty.in.h: Likewise.
* lib/sched.in.h: Likewise.
* lib/se-selinux.in.h: Likewise.
* lib/search.in.h: Likewise.
* lib/signal.in.h: Likewise.
* lib/spawn.in.h: Likewise.
* lib/stdarg.in.h: Likewise.
* lib/stddef.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/sys_times.in.h: Likewise.
* lib/sys_uio.in.h: Likewise.
* lib/sys_utsname.in.h: Likewise.
* lib/sys_wait.in.h: Likewise.
* lib/sysexits.in.h: Likewise.
* lib/termios.in.h: Likewise.
* lib/time.in.h: Likewise.
* lib/unistd.in.h: Likewise.
* lib/wchar.in.h: Likewise.
* lib/wctype.in.h: Likewise.
* modules/arpa_inet (Makefile.am): Substitute @GUARD_PREFIX@.
* modules/ctype (Makefile.am): Likewise.
* modules/dirent (Makefile.am): Likewise.
* modules/errno (Makefile.am): Likewise.
* modules/fcntl-h (Makefile.am): Likewise.
* modules/float (Makefile.am): Likewise.
* modules/getopt-posix (Makefile.am): Likewise.
* modules/iconv-h (Makefile.am): Likewise.
* modules/langinfo (Makefile.am): Likewise.
* modules/locale (Makefile.am): Likewise.
* modules/math (Makefile.am): Likewise.
* modules/netdb (Makefile.am): Likewise.
* modules/netinet_in (Makefile.am): Likewise.
* modules/poll-h (Makefile.am): Likewise.
* modules/pthread (Makefile.am): Likewise.
* modules/pty (Makefile.am): Likewise.
* modules/sched (Makefile.am): Likewise.
* modules/search (Makefile.am): Likewise.
* modules/selinux-h (Makefile.am): Likewise.
* modules/signal (Makefile.am): Likewise.
* modules/spawn (Makefile.am): Likewise.
* modules/stdarg (Makefile.am): Likewise.
* modules/stddef (Makefile.am): Likewise.
* modules/stdint (Makefile.am): Likewise.
* modules/stdio (Makefile.am): Likewise.
* modules/stdlib (Makefile.am): Likewise.
* modules/string (Makefile.am): Likewise.
* modules/strings (Makefile.am): Likewise.
* modules/sys_file (Makefile.am): Likewise.
* modules/sys_ioctl (Makefile.am): Likewise.
* modules/sys_select (Makefile.am): Likewise.
* modules/sys_socket (Makefile.am): Likewise.
* modules/sys_stat (Makefile.am): Likewise.
* modules/sys_time (Makefile.am): Likewise.
* modules/sys_times (Makefile.am): Likewise.
* modules/sys_uio (Makefile.am): Likewise.
* modules/sys_utsname (Makefile.am): Likewise.
* modules/sys_wait (Makefile.am): Likewise.
* modules/sysexits (Makefile.am): Likewise.
* modules/termios (Makefile.am): Likewise.
* modules/time (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.
* modules/wctype-h (Makefile.am): Likewise.
* modules/assert-h (Makefile.am): Replace _GL_VERIFY_H specially.
parent 606b7ac5
2011-05-29 Bruno Haible <bruno@clisp.org>
Allow multiple gnulib generated include files to be combined.
* gnulib-tool (func_compute_include_guard_prefix): New function.
(func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Resolve also
${gl_include_guard_prefix} references.
(func_import, func_create_testdir): Invoke
func_compute_include_guard_prefix.
* lib/arpa_inet.in.h: Use the @GUARD_PREFIX@ placeholder.
* lib/ctype.in.h: Likewise.
* lib/dirent.in.h: Likewise.
* lib/errno.in.h: Likewise.
* lib/fcntl.in.h: Likewise.
* lib/float.in.h: Likewise.
* lib/getopt.in.h: Likewise.
* lib/iconv.in.h: Likewise.
* lib/langinfo.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/poll.in.h: Likewise.
* lib/pthread.in.h: Likewise.
* lib/pty.in.h: Likewise.
* lib/sched.in.h: Likewise.
* lib/se-selinux.in.h: Likewise.
* lib/search.in.h: Likewise.
* lib/signal.in.h: Likewise.
* lib/spawn.in.h: Likewise.
* lib/stdarg.in.h: Likewise.
* lib/stddef.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/sys_times.in.h: Likewise.
* lib/sys_uio.in.h: Likewise.
* lib/sys_utsname.in.h: Likewise.
* lib/sys_wait.in.h: Likewise.
* lib/sysexits.in.h: Likewise.
* lib/termios.in.h: Likewise.
* lib/time.in.h: Likewise.
* lib/unistd.in.h: Likewise.
* lib/wchar.in.h: Likewise.
* lib/wctype.in.h: Likewise.
* modules/arpa_inet (Makefile.am): Substitute @GUARD_PREFIX@.
* modules/ctype (Makefile.am): Likewise.
* modules/dirent (Makefile.am): Likewise.
* modules/errno (Makefile.am): Likewise.
* modules/fcntl-h (Makefile.am): Likewise.
* modules/float (Makefile.am): Likewise.
* modules/getopt-posix (Makefile.am): Likewise.
* modules/iconv-h (Makefile.am): Likewise.
* modules/langinfo (Makefile.am): Likewise.
* modules/locale (Makefile.am): Likewise.
* modules/math (Makefile.am): Likewise.
* modules/netdb (Makefile.am): Likewise.
* modules/netinet_in (Makefile.am): Likewise.
* modules/poll-h (Makefile.am): Likewise.
* modules/pthread (Makefile.am): Likewise.
* modules/pty (Makefile.am): Likewise.
* modules/sched (Makefile.am): Likewise.
* modules/search (Makefile.am): Likewise.
* modules/selinux-h (Makefile.am): Likewise.
* modules/signal (Makefile.am): Likewise.
* modules/spawn (Makefile.am): Likewise.
* modules/stdarg (Makefile.am): Likewise.
* modules/stddef (Makefile.am): Likewise.
* modules/stdint (Makefile.am): Likewise.
* modules/stdio (Makefile.am): Likewise.
* modules/stdlib (Makefile.am): Likewise.
* modules/string (Makefile.am): Likewise.
* modules/strings (Makefile.am): Likewise.
* modules/sys_file (Makefile.am): Likewise.
* modules/sys_ioctl (Makefile.am): Likewise.
* modules/sys_select (Makefile.am): Likewise.
* modules/sys_socket (Makefile.am): Likewise.
* modules/sys_stat (Makefile.am): Likewise.
* modules/sys_time (Makefile.am): Likewise.
* modules/sys_times (Makefile.am): Likewise.
* modules/sys_uio (Makefile.am): Likewise.
* modules/sys_utsname (Makefile.am): Likewise.
* modules/sys_wait (Makefile.am): Likewise.
* modules/sysexits (Makefile.am): Likewise.
* modules/termios (Makefile.am): Likewise.
* modules/time (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.
* modules/wctype-h (Makefile.am): Likewise.
* modules/assert-h (Makefile.am): Replace _GL_VERIFY_H specially.
2011-05-29 Bruno Haible <bruno@clisp.org>
assert-h: Allow multiple gnulib generated replacements to coexist.
......@@ -52,9 +52,9 @@ Bruno Haible says:
Discussion:
<http://lists.gnu.org/archive/html/bug-gnulib/2010-10/msg00289.html>
Half of the work has been done, but not yet pushed.
<http://lists.gnu.org/archive/html/bug-gnulib/2010-11/msg00199.html>
<http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00078.html>
Still missing: dealing with include_next and old compilers, cf.
<http://lists.gnu.org/archive/html/bug-gnulib/2010-10/msg00269.html>
<http://lists.gnu.org/archive/html/bug-gnulib/2010-10/msg00285.html>
2) Allow using libgnu's file name in module descriptions.
<http://lists.gnu.org/archive/html/bug-gnulib/2010-10/msg00284.html>
......
......@@ -3010,6 +3010,24 @@ func_modules_to_filelist_separately ()
fi
}
# func_compute_include_guard_prefix
# Determine include_guard_prefix.
# Input:
# - macro_prefix prefix of gl_LIBOBJS macros to use
# Output:
# - include_guard_prefix replacement for ${gl_include_guard_prefix}
# - sed_replace_include_guard_prefix
# sed expression for resolving ${gl_include_guard_prefix}
func_compute_include_guard_prefix ()
{
if test "$macro_prefix" = gl; then
include_guard_prefix='GL'
else
include_guard_prefix='GL_'`echo "$macro_prefix" | LC_ALL=C tr '[a-z]' '[A-Z]'`
fi
sed_replace_include_guard_prefix='s/\${gl_include_guard_prefix}/'"${include_guard_prefix}"'/g'
}
# func_execute_command command [args...]
# Executes a command.
# Uses also the variables
......@@ -3154,6 +3172,8 @@ func_update_file ()
# - po_domain prefix of i18n domain to use (without -gnulib suffix)
# - actioncmd (optional) command that will reproduce this invocation
# - for_test true if creating a package for testing, false otherwise
# - sed_replace_include_guard_prefix
# sed expression for resolving ${gl_include_guard_prefix}
# - destfile filename relative to destdir of makefile being generated
# Input/Output:
# - makefile_am_edits and makefile_am_edit${edit}_{dir,var,val}
......@@ -3215,7 +3235,8 @@ func_emit_lib_Makefile_am ()
-e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' \
-e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
-e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \
-e "$sed_transform_check_PROGRAMS"
-e "$sed_transform_check_PROGRAMS" \
-e "$sed_replace_include_guard_prefix"
if test "$module" = 'alloca'; then
echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@"
echo "${libname}_${libext}_DEPENDENCIES += @${perhapsLT}ALLOCA@"
......@@ -3462,6 +3483,8 @@ func_emit_po_POTFILES_in ()
# - single_configure true if a single configure file should be generated,
# false for a separate configure file for the tests
# - use_libtests true if a libtests.a should be built, false otherwise
# - sed_replace_include_guard_prefix
# sed expression for resolving ${gl_include_guard_prefix}
# - destfile filename relative to destdir of makefile being generated
# Input/Output:
# - makefile_am_edits and makefile_am_edit${edit}_{dir,var,val}
......@@ -3510,7 +3533,8 @@ func_emit_tests_Makefile_am ()
-e 's,lib_\([A-Z][A-Z]*\),libtests_a_\1,g' \
-e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
-e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \
-e "$sed_transform_check_PROGRAMS"
-e "$sed_transform_check_PROGRAMS" \
-e "$sed_replace_include_guard_prefix"
if $use_libtests && test "$module" = 'alloca'; then
echo "libtests_a_LIBADD += @${perhapsLT}ALLOCA@"
echo "libtests_a_DEPENDENCIES += @${perhapsLT}ALLOCA@"
......@@ -4715,6 +4739,9 @@ s,^\(.................................................[^ ]*\) *,
fi
func_append actioncmd " `echo $specified_modules`"
# Determine include_guard_prefix.
func_compute_include_guard_prefix
# Default the makefile name to Makefile.am.
if test -n "$makefile_name"; then
makefile_am=$makefile_name
......@@ -5586,6 +5613,9 @@ func_create_testdir ()
exec 0<&5 5<&-
}
# Determine include_guard_prefix.
func_compute_include_guard_prefix
# Create Makefile.ams that are for testing.
for_test=true
......
......@@ -16,7 +16,7 @@
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_ARPA_INET_H
#ifndef _@GUARD_PREFIX@_ARPA_INET_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -47,8 +47,8 @@
#endif
#ifndef _GL_ARPA_INET_H
#define _GL_ARPA_INET_H
#ifndef _@GUARD_PREFIX@_ARPA_INET_H
#define _@GUARD_PREFIX@_ARPA_INET_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
......@@ -111,5 +111,5 @@ _GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - "
#endif
#endif /* _GL_ARPA_INET_H */
#endif /* _GL_ARPA_INET_H */
#endif /* _@GUARD_PREFIX@_ARPA_INET_H */
#endif /* _@GUARD_PREFIX@_ARPA_INET_H */
......@@ -23,7 +23,7 @@
* <http://www.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html>
*/
#ifndef _GL_CTYPE_H
#ifndef _@GUARD_PREFIX@_CTYPE_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -34,8 +34,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_CTYPE_H@
#ifndef _GL_CTYPE_H
#define _GL_CTYPE_H
#ifndef _@GUARD_PREFIX@_CTYPE_H
#define _@GUARD_PREFIX@_CTYPE_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
......@@ -54,5 +54,5 @@ _GL_WARN_ON_USE (isblank, "isblank is unportable - "
# endif
#endif
#endif /* _GL_CTYPE_H */
#endif /* _GL_CTYPE_H */
#endif /* _@GUARD_PREFIX@_CTYPE_H */
#endif /* _@GUARD_PREFIX@_CTYPE_H */
......@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_DIRENT_H
#ifndef _@GUARD_PREFIX@_DIRENT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -24,8 +24,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_DIRENT_H@
#ifndef _GL_DIRENT_H
#define _GL_DIRENT_H
#ifndef _@GUARD_PREFIX@_DIRENT_H
#define _@GUARD_PREFIX@_DIRENT_H
/* Get ino_t. Needed on some systems, including glibc 2.8. */
#include <sys/types.h>
......@@ -168,5 +168,5 @@ _GL_WARN_ON_USE (alphasort, "alphasort is unportable - "
#endif
#endif /* _GL_DIRENT_H */
#endif /* _GL_DIRENT_H */
#endif /* _@GUARD_PREFIX@_DIRENT_H */
#endif /* _@GUARD_PREFIX@_DIRENT_H */
......@@ -16,7 +16,7 @@
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
#ifndef _@GUARD_PREFIX@_ERRNO_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -26,8 +26,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
#ifndef _GL_ERRNO_H
#define _GL_ERRNO_H
#ifndef _@GUARD_PREFIX@_ERRNO_H
#define _@GUARD_PREFIX@_ERRNO_H
/* On native Windows platforms, many macros are not defined. */
......@@ -163,5 +163,5 @@
# endif
#endif /* _GL_ERRNO_H */
#endif /* _GL_ERRNO_H */
#endif /* _@GUARD_PREFIX@_ERRNO_H */
#endif /* _@GUARD_PREFIX@_ERRNO_H */
......@@ -40,7 +40,7 @@
#else
/* Normal invocation convention. */
#ifndef _GL_FCNTL_H
#ifndef _@GUARD_PREFIX@_FCNTL_H
#include <sys/types.h>
/* On some systems other than glibc, <sys/stat.h> is a prerequisite of
......@@ -55,8 +55,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
#ifndef _GL_FCNTL_H
#define _GL_FCNTL_H
#ifndef _@GUARD_PREFIX@_FCNTL_H
#define _@GUARD_PREFIX@_FCNTL_H
#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
# include <unistd.h>
......@@ -320,6 +320,6 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
#endif
#endif /* _GL_FCNTL_H */
#endif /* _GL_FCNTL_H */
#endif /* _@GUARD_PREFIX@_FCNTL_H */
#endif /* _@GUARD_PREFIX@_FCNTL_H */
#endif
......@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_FLOAT_H
#ifndef _@GUARD_PREFIX@_FLOAT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -25,8 +25,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_FLOAT_H@
#ifndef _GL_FLOAT_H
#define _GL_FLOAT_H
#ifndef _@GUARD_PREFIX@_FLOAT_H
#define _@GUARD_PREFIX@_FLOAT_H
/* 'long double' properties. */
#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
......@@ -59,5 +59,5 @@
# define LDBL_MAX_10_EXP 4932
#endif
#endif /* _GL_FLOAT_H */
#endif /* _GL_FLOAT_H */
#endif /* _@GUARD_PREFIX@_FLOAT_H */
#endif /* _@GUARD_PREFIX@_FLOAT_H */
......@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_GETOPT_H
#ifndef _@GUARD_PREFIX@_GETOPT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -32,10 +32,10 @@
# undef _GL_SYSTEM_GETOPT
#endif
#ifndef _GL_GETOPT_H
#ifndef _@GUARD_PREFIX@_GETOPT_H
#ifndef __need_getopt
# define _GL_GETOPT_H 1
# define _@GUARD_PREFIX@_GETOPT_H 1
#endif
/* Standalone applications should #define __GETOPT_PREFIX to an
......@@ -249,5 +249,5 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
/* Make sure we later can get all the definitions and declarations. */
#undef __need_getopt
#endif /* getopt.h */
#endif /* getopt.h */
#endif /* _@GUARD_PREFIX@_GETOPT_H */
#endif /* _@GUARD_PREFIX@_GETOPT_H */
......@@ -16,7 +16,7 @@
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
#ifndef _@GUARD_PREFIX@_ICONV_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -26,8 +26,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_ICONV_H@
#ifndef _GL_ICONV_H
#define _GL_ICONV_H
#ifndef _@GUARD_PREFIX@_ICONV_H
#define _@GUARD_PREFIX@_ICONV_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
......@@ -107,5 +107,5 @@ _GL_CXXALIASWARN (iconv_close);
#endif
#endif /* _GL_ICONV_H */
#endif /* _GL_ICONV_H */
#endif /* _@GUARD_PREFIX@_ICONV_H */
#endif /* _@GUARD_PREFIX@_ICONV_H */
......@@ -20,7 +20,7 @@
* <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
*/
#ifndef _GL_LANGINFO_H
#ifndef _@GUARD_PREFIX@_LANGINFO_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -32,8 +32,8 @@
# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
#endif
#ifndef _GL_LANGINFO_H
#define _GL_LANGINFO_H
#ifndef _@GUARD_PREFIX@_LANGINFO_H
#define _@GUARD_PREFIX@_LANGINFO_H
#if !@HAVE_LANGINFO_H@
......@@ -173,5 +173,5 @@ _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
#endif
#endif /* _GL_LANGINFO_H */
#endif /* _GL_LANGINFO_H */
#endif /* _@GUARD_PREFIX@_LANGINFO_H */
#endif /* _@GUARD_PREFIX@_LANGINFO_H */
......@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_LOCALE_H
#ifndef _@GUARD_PREFIX@_LOCALE_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -24,8 +24,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
#ifndef _GL_LOCALE_H
#define _GL_LOCALE_H
#ifndef _@GUARD_PREFIX@_LOCALE_H
#define _@GUARD_PREFIX@_LOCALE_H
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
......@@ -92,5 +92,5 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
# endif
#endif
#endif /* _GL_LOCALE_H */
#endif /* _GL_LOCALE_H */
#endif /* _@GUARD_PREFIX@_LOCALE_H */
#endif /* _@GUARD_PREFIX@_LOCALE_H */
......@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_MATH_H
#ifndef _@GUARD_PREFIX@_MATH_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -25,8 +25,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
#ifndef _GL_MATH_H
#define _GL_MATH_H
#ifndef _@GUARD_PREFIX@_MATH_H
#define _@GUARD_PREFIX@_MATH_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
......@@ -806,5 +806,5 @@ _GL_WARN_REAL_FLOATING_DECL (signbit);
#endif
#endif /* _GL_MATH_H */
#endif /* _GL_MATH_H */
#endif /* _@GUARD_PREFIX@_MATH_H */
#endif /* _@GUARD_PREFIX@_MATH_H */
......@@ -20,7 +20,7 @@
It is intended to provide definitions and prototypes needed by an
application. */
#ifndef _GL_NETDB_H
#ifndef _@GUARD_PREFIX@_NETDB_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -34,8 +34,8 @@
#endif
#ifndef _GL_NETDB_H
#define _GL_NETDB_H
#ifndef _@GUARD_PREFIX@_NETDB_H
#define _@GUARD_PREFIX@_NETDB_H
/* Get <netdb.h> definitions such as 'socklen_t' on IRIX 6.5 and OSF/1 4.0 and
'struct hostent' on MinGW. */
......@@ -262,5 +262,5 @@ _GL_WARN_ON_USE (getnameinfo, "getnameinfo is unportable - "
#endif
#endif /* _GL_NETDB_H */
#endif /* _GL_NETDB_H */
#endif /* _@GUARD_PREFIX@_NETDB_H */
#endif /* _@GUARD_PREFIX@_NETDB_H */
......@@ -15,7 +15,7 @@
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
#ifndef _@GUARD_PREFIX@_NETINET_IN_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -33,8 +33,8 @@
#endif
#ifndef _GL_NETINET_IN_H
#define _GL_NETINET_IN_H
#ifndef _@GUARD_PREFIX@_NETINET_IN_H
#define _@GUARD_PREFIX@_NETINET_IN_H
#if !@HAVE_NETINET_IN_H@
......@@ -44,5 +44,5 @@
#endif
#endif /* _GL_NETINET_IN_H */
#endif /* _GL_NETINET_IN_H */
#endif /* _@GUARD_PREFIX@_NETINET_IN_H */
#endif /* _@GUARD_PREFIX@_NETINET_IN_H */
......@@ -19,7 +19,7 @@
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GL_POLL_H
#ifndef _@GUARD_PREFIX@_POLL_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -31,8 +31,8 @@
# @INCLUDE_NEXT@ @NEXT_POLL_H@
#endif
#ifndef _GL_POLL_H
#define _GL_POLL_H
#ifndef _@GUARD_PREFIX@_POLL_H
#define _@GUARD_PREFIX@_POLL_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
......@@ -100,5 +100,5 @@ _GL_WARN_ON_USE (poll, "poll is unportable - "
#endif
#endif /* _GL_POLL_H */
#endif /* _GL_POLL_H */
#endif /* _@GUARD_PREFIX@_POLL_H */
#endif /* _@GUARD_PREFIX@_POLL_H */
......@@ -18,7 +18,7 @@
/* Written by Paul Eggert and Glen Lenker. */
#ifndef _GL_PTHREAD_H_
#ifndef _@GUARD_PREFIX@_PTHREAD_H_
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -30,8 +30,8 @@
# @INCLUDE_NEXT@ @NEXT_PTHREAD_H@
#endif
#ifndef _GL_PTHREAD_H_
#define _GL_PTHREAD_H_
#ifndef _@GUARD_PREFIX@_PTHREAD_H_
#define _@GUARD_PREFIX@_PTHREAD_H_
#include <errno.h>
#include <stdlib.h>
......@@ -270,5 +270,5 @@ pthread_spin_unlock (pthread_spinlock_t *lock)
#endif
#endif /* _GL_PTHREAD_H_ */
#endif /* _GL_PTHREAD_H_ */
#endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
#endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
......@@ -15,7 +15,7 @@
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
#ifndef _@GUARD_PREFIX@_PTY_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -27,8 +27,8 @@
# @INCLUDE_NEXT@ @NEXT_PTY_H@
#endif
#ifndef _GL_PTY_H
#define _GL_PTY_H
#ifndef _@GUARD_PREFIX@_PTY_H
#define _@GUARD_PREFIX@_PTY_H
/* Some platforms declare this in a different header than glibc. */
#if @HAVE_UTIL_H@
......@@ -120,5 +120,5 @@ _GL_WARN_ON_USE (openpty, "openpty is not declared consistently - "
#endif
#endif /* _GL_PTY_H */
#endif /* _GL_PTY_H */
#endif /* _@GUARD_PREFIX@_PTY_H */
#endif /* _@GUARD_PREFIX@_PTY_H */
......@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_SCHED_H
#ifndef _@GUARD_PREFIX@_SCHED_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -26,8 +26,8 @@
# @INCLUDE_NEXT@ @NEXT_SCHED_H@
#endif
#ifndef _GL_SCHED_H
#define _GL_SCHED_H
#ifndef _@GUARD_PREFIX@_SCHED_H
#define _@GUARD_PREFIX@_SCHED_H
#if !@HAVE_STRUCT_SCHED_PARAM@
......@@ -47,5 +47,5 @@ struct sched_param
# define SCHED_OTHER 0
#endif
#endif /* _GL_SCHED_H */
#endif /* _GL_SCHED_H */
#endif /* _@GUARD_PREFIX@_SCHED_H */
#endif /* _@GUARD_PREFIX@_SCHED_H */
......@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_SELINUX_SELINUX_H
# define _GL_SELINUX_SELINUX_H
#ifndef _@GUARD_PREFIX@_SELINUX_SELINUX_H
# define _@GUARD_PREFIX@_SELINUX_SELINUX_H
# if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -94,4 +94,4 @@ static inline int matchpathcon_init_prefix
# endif
# endif
#endif /* _GL_SELINUX_SELINUX_H */
#endif /* _@GUARD_PREFIX@_SELINUX_SELINUX_H */
......@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_SEARCH_H
#ifndef _@GUARD_PREFIX@_SEARCH_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -27,8 +27,8 @@
# @INCLUDE_NEXT@ @NEXT_SEARCH_H@
#endif
#ifndef _GL_SEARCH_H
#define _GL_SEARCH_H
#ifndef _@GUARD_PREFIX@_SEARCH_H
#define _@GUARD_PREFIX@_SEARCH_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
......@@ -203,5 +203,5 @@ _GL_WARN_ON_USE (twalk, "twalk is unportable - "
#endif
#endif /* _GL_SEARCH_H */
#endif /* _GL_SEARCH_H */
#endif /* _@GUARD_PREFIX@_SEARCH_H */
#endif /* _@GUARD_PREFIX@_SEARCH_H */
......@@ -28,13 +28,13 @@
#else
/* Normal invocation convention. */
#ifndef _GL_SIGNAL_H
#ifndef _@GUARD_PREFIX@_SIGNAL_H
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
#ifndef _GL_SIGNAL_H
#define _GL_SIGNAL_H
#ifndef _@GUARD_PREFIX@_SIGNAL_H
#define _@GUARD_PREFIX@_SIGNAL_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
......@@ -371,6 +371,6 @@ _GL_WARN_ON_USE (sigaction, "sigaction is unportable - "
#endif
#endif /* _GL_SIGNAL_H */
#endif /* _GL_SIGNAL_H */
#endif /* _@GUARD_PREFIX@_SIGNAL_H */
#endif /* _@GUARD_PREFIX@_SIGNAL_H */
#endif
......@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_SPAWN_H
#ifndef _@GUARD_PREFIX@_SPAWN_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
......@@ -27,8 +27,8 @@
# @INCLUDE_NEXT@ @NEXT_SPAWN_H@
#endif
#ifndef _GL_SPAWN_H
#define _GL_SPAWN_H
#ifndef _@GUARD_PREFIX@_SPAWN_H
#define _@GUARD_PREFIX@_SPAWN_H
/* Get definitions of 'struct sched_param' and 'sigset_t'.
But avoid namespace pollution on glibc systems. */
......@@ -877,5 +877,5 @@ _GL_WARN_ON_USE (posix_spawn_file_actions_adddup2,
#endif