Upgrade to gnulib 6b8f1dd1a21ce49319795391e21adf645b64db3c.
* m4/absolute-header.m4: New file. * lib/Makefile.am, lib/argp-fmtstream.h, lib/argp.h, lib/error.c, lib/gethrxtime.h, lib/intprops.h, lib/localcharset.c, lib/quotearg.c, lib/stdio.in.h, lib/strerror-override.h, lib/sys_time.in.h, lib/timespec.h, lib/unistd.in.h, lib/verify.h, lib/wctype.in.h, lib/xalloc.h, lib/xsize.h, lib/xtime.h, m4/configmake.m4, m4/extern-inline.m4, m4/gnulib-comp.m4, m4/include_next.m4, m4/unistd_h.m4: Update to today's gnulib.
This commit is contained in:
parent
0afb9fe103
commit
7cfda699e6
24 changed files with 250 additions and 69 deletions
|
|
@ -53,6 +53,15 @@ libgnu_la_LDFLAGS += $(LIB_CLOCK_GETTIME)
|
||||||
libgnu_la_LDFLAGS += $(LIB_GETHRXTIME)
|
libgnu_la_LDFLAGS += $(LIB_GETHRXTIME)
|
||||||
libgnu_la_LDFLAGS += $(LTLIBINTL)
|
libgnu_la_LDFLAGS += $(LTLIBINTL)
|
||||||
|
|
||||||
|
## begin gnulib module absolute-header
|
||||||
|
|
||||||
|
# Use this preprocessor expression to decide whether #include_next works.
|
||||||
|
# Do not rely on a 'configure'-time test for this, since the expression
|
||||||
|
# might appear in an installed header, which is used by some other compiler.
|
||||||
|
HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
|
||||||
|
|
||||||
|
## end gnulib module absolute-header
|
||||||
|
|
||||||
## begin gnulib module alloca
|
## begin gnulib module alloca
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -126,7 +135,7 @@ EXTRA_DIST += c-strcaseeq.h
|
||||||
## begin gnulib module configmake
|
## begin gnulib module configmake
|
||||||
|
|
||||||
# Listed in the same order as the GNU makefile conventions, and
|
# Listed in the same order as the GNU makefile conventions, and
|
||||||
# provided by autoconf 2.59c+.
|
# provided by autoconf 2.59c+ or 2.70.
|
||||||
# The Automake-defined pkg* macros are appended, in the order
|
# The Automake-defined pkg* macros are appended, in the order
|
||||||
# listed in the Automake 1.10a+ documentation.
|
# listed in the Automake 1.10a+ documentation.
|
||||||
configmake.h: Makefile
|
configmake.h: Makefile
|
||||||
|
|
@ -142,6 +151,7 @@ configmake.h: Makefile
|
||||||
echo '#define SYSCONFDIR "$(sysconfdir)"'; \
|
echo '#define SYSCONFDIR "$(sysconfdir)"'; \
|
||||||
echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
|
echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
|
||||||
echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
|
echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
|
||||||
|
echo '#define RUNSTATEDIR "$(runstatedir)"'; \
|
||||||
echo '#define INCLUDEDIR "$(includedir)"'; \
|
echo '#define INCLUDEDIR "$(includedir)"'; \
|
||||||
echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
|
echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
|
||||||
echo '#define DOCDIR "$(docdir)"'; \
|
echo '#define DOCDIR "$(docdir)"'; \
|
||||||
|
|
@ -1620,6 +1630,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
|
||||||
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
|
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
|
||||||
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
|
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
|
||||||
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
|
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
|
||||||
|
-e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
|
||||||
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
|
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
|
||||||
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
|
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
|
||||||
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
|
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,9 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
|
||||||
#define __argp_fmtstream_point argp_fmtstream_point
|
#define __argp_fmtstream_point argp_fmtstream_point
|
||||||
#define __argp_fmtstream_update _argp_fmtstream_update
|
#define __argp_fmtstream_update _argp_fmtstream_update
|
||||||
#define __argp_fmtstream_ensure _argp_fmtstream_ensure
|
#define __argp_fmtstream_ensure _argp_fmtstream_ensure
|
||||||
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
_GL_INLINE_HEADER_BEGIN
|
_GL_INLINE_HEADER_BEGIN
|
||||||
#ifndef ARGP_FS_EI
|
#ifndef ARGP_FS_EI
|
||||||
# define ARGP_FS_EI _GL_INLINE
|
# define ARGP_FS_EI _GL_INLINE
|
||||||
|
|
|
||||||
|
|
@ -579,6 +579,9 @@ extern void *__argp_input (const struct argp *__restrict __argp,
|
||||||
# define __argp_state_help argp_state_help
|
# define __argp_state_help argp_state_help
|
||||||
# define __option_is_short _option_is_short
|
# define __option_is_short _option_is_short
|
||||||
# define __option_is_end _option_is_end
|
# define __option_is_end _option_is_end
|
||||||
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
_GL_INLINE_HEADER_BEGIN
|
_GL_INLINE_HEADER_BEGIN
|
||||||
# ifndef ARGP_EI
|
# ifndef ARGP_EI
|
||||||
# define ARGP_EI _GL_INLINE
|
# define ARGP_EI _GL_INLINE
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ print_errno_message (int errnum)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))
|
||||||
error_tail (int status, int errnum, const char *message, va_list args)
|
error_tail (int status, int errnum, const char *message, va_list args)
|
||||||
{
|
{
|
||||||
#if _LIBC
|
#if _LIBC
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,9 @@
|
||||||
|
|
||||||
#include "xtime.h"
|
#include "xtime.h"
|
||||||
|
|
||||||
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
_GL_INLINE_HEADER_BEGIN
|
_GL_INLINE_HEADER_BEGIN
|
||||||
#ifndef GETHRXTIME_INLINE
|
#ifndef GETHRXTIME_INLINE
|
||||||
# define GETHRXTIME_INLINE _GL_INLINE
|
# define GETHRXTIME_INLINE _GL_INLINE
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,8 @@
|
||||||
|
|
||||||
/* Return 1 if the __typeof__ keyword works. This could be done by
|
/* Return 1 if the __typeof__ keyword works. This could be done by
|
||||||
'configure', but for now it's easier to do it by hand. */
|
'configure', but for now it's easier to do it by hand. */
|
||||||
#if 2 <= __GNUC__ || defined __IBM__TYPEOF__ || 0x5110 <= __SUNPRO_C
|
#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
|
||||||
|
|| (0x5110 <= __SUNPRO_C && !__STDC__))
|
||||||
# define _GL_HAVE___TYPEOF__ 1
|
# define _GL_HAVE___TYPEOF__ 1
|
||||||
#else
|
#else
|
||||||
# define _GL_HAVE___TYPEOF__ 0
|
# define _GL_HAVE___TYPEOF__ 0
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,11 @@
|
||||||
# include <os2.h>
|
# include <os2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* For MB_CUR_MAX_L */
|
||||||
|
#if defined DARWIN7
|
||||||
|
# include <xlocale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLE_RELOCATABLE
|
#if ENABLE_RELOCATABLE
|
||||||
# include "relocatable.h"
|
# include "relocatable.h"
|
||||||
#else
|
#else
|
||||||
|
|
@ -545,7 +550,7 @@ locale_charset (void)
|
||||||
#ifdef DARWIN7
|
#ifdef DARWIN7
|
||||||
/* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
|
/* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
|
||||||
(the default codeset) does not work when MB_CUR_MAX is 1. */
|
(the default codeset) does not work when MB_CUR_MAX is 1. */
|
||||||
if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1)
|
if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1)
|
||||||
codeset = "ASCII";
|
codeset = "ASCII";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -626,7 +626,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
|
||||||
|
|
||||||
if (! ((backslash_escapes || elide_outer_quotes)
|
if (! ((backslash_escapes || elide_outer_quotes)
|
||||||
&& quote_these_too
|
&& quote_these_too
|
||||||
&& quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
|
&& quote_these_too[c / INT_BITS] >> (c % INT_BITS) & 1)
|
||||||
&& !is_right_quote)
|
&& !is_right_quote)
|
||||||
goto store_c;
|
goto store_c;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,15 @@
|
||||||
#define _GL_STDIO_STRINGIZE(token) #token
|
#define _GL_STDIO_STRINGIZE(token) #token
|
||||||
#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
|
#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
|
||||||
|
|
||||||
|
/* When also using extern inline, suppress the use of static inline in
|
||||||
|
standard headers of problematic Apple configurations, as Libc at
|
||||||
|
least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
|
||||||
|
<http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
|
||||||
|
Perhaps Apple will fix this some day. */
|
||||||
|
#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
|
||||||
|
&& defined __GNUC__ && defined __STDC__)
|
||||||
|
# undef putc_unlocked
|
||||||
|
#endif
|
||||||
|
|
||||||
#if @GNULIB_DPRINTF@
|
#if @GNULIB_DPRINTF@
|
||||||
# if @REPLACE_DPRINTF@
|
# if @REPLACE_DPRINTF@
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
|| GNULIB_defined_EOWNERDEAD \
|
|| GNULIB_defined_EOWNERDEAD \
|
||||||
|| GNULIB_defined_ENOTRECOVERABLE \
|
|| GNULIB_defined_ENOTRECOVERABLE \
|
||||||
|| GNULIB_defined_EILSEQ
|
|| GNULIB_defined_EILSEQ
|
||||||
extern const char *strerror_override (int errnum);
|
extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST;
|
||||||
# else
|
# else
|
||||||
# define strerror_override(ignored) NULL
|
# define strerror_override(ignored) NULL
|
||||||
# endif
|
# endif
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,12 @@
|
||||||
#endif
|
#endif
|
||||||
@PRAGMA_COLUMNS@
|
@PRAGMA_COLUMNS@
|
||||||
|
|
||||||
/* On Cygwin, <sys/time.h> includes itself recursively via <sys/select.h>.
|
/* On Cygwin and on many BSDish systems, <sys/time.h> includes itself
|
||||||
|
recursively via <sys/select.h>.
|
||||||
Simply delegate to the system's header in this case; it is a no-op.
|
Simply delegate to the system's header in this case; it is a no-op.
|
||||||
Without this extra ifdef, the C++ gettimeofday declaration below
|
Without this extra ifdef, the C++ gettimeofday declaration below
|
||||||
would be a forward declaration in gnulib's nested <sys/time.h>. */
|
would be a forward declaration in gnulib's nested <sys/time.h>. */
|
||||||
#ifdef _CYGWIN_SYS_TIME_H
|
#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_
|
||||||
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
|
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,31 @@
|
||||||
|
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
|
|
||||||
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
_GL_INLINE_HEADER_BEGIN
|
_GL_INLINE_HEADER_BEGIN
|
||||||
#ifndef _GL_TIMESPEC_INLINE
|
#ifndef _GL_TIMESPEC_INLINE
|
||||||
# define _GL_TIMESPEC_INLINE _GL_INLINE
|
# define _GL_TIMESPEC_INLINE _GL_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Resolution of timespec time stamps (in units per second), and log
|
||||||
|
base 10 of the resolution. */
|
||||||
|
|
||||||
|
enum { TIMESPEC_RESOLUTION = 1000000000 };
|
||||||
|
enum { LOG10_TIMESPEC_RESOLUTION = 9 };
|
||||||
|
|
||||||
|
/* Return a timespec with seconds S and nanoseconds NS. */
|
||||||
|
|
||||||
|
_GL_TIMESPEC_INLINE struct timespec
|
||||||
|
make_timespec (time_t s, long int ns)
|
||||||
|
{
|
||||||
|
struct timespec r;
|
||||||
|
r.tv_sec = s;
|
||||||
|
r.tv_nsec = ns;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
|
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
|
||||||
|
|
||||||
For each time stamp T, this code assumes that either:
|
For each time stamp T, this code assumes that either:
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,9 @@
|
||||||
# include <getopt.h>
|
# include <getopt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
_GL_INLINE_HEADER_BEGIN
|
_GL_INLINE_HEADER_BEGIN
|
||||||
#ifndef _GL_UNISTD_INLINE
|
#ifndef _GL_UNISTD_INLINE
|
||||||
# define _GL_UNISTD_INLINE _GL_INLINE
|
# define _GL_UNISTD_INLINE _GL_INLINE
|
||||||
|
|
@ -651,10 +654,19 @@ _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
|
||||||
#if @GNULIB_GETDTABLESIZE@
|
#if @GNULIB_GETDTABLESIZE@
|
||||||
/* Return the maximum number of file descriptors in the current process.
|
/* Return the maximum number of file descriptors in the current process.
|
||||||
In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
|
In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
|
||||||
# if !@HAVE_GETDTABLESIZE@
|
# if @REPLACE_GETDTABLESIZE@
|
||||||
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||||
|
# undef getdtablesize
|
||||||
|
# define getdtablesize rpl_getdtablesize
|
||||||
|
# endif
|
||||||
|
_GL_FUNCDECL_RPL (getdtablesize, int, (void));
|
||||||
|
_GL_CXXALIAS_RPL (getdtablesize, int, (void));
|
||||||
|
# else
|
||||||
|
# if !@HAVE_GETDTABLESIZE@
|
||||||
_GL_FUNCDECL_SYS (getdtablesize, int, (void));
|
_GL_FUNCDECL_SYS (getdtablesize, int, (void));
|
||||||
# endif
|
# endif
|
||||||
_GL_CXXALIAS_SYS (getdtablesize, int, (void));
|
_GL_CXXALIAS_SYS (getdtablesize, int, (void));
|
||||||
|
# endif
|
||||||
_GL_CXXALIASWARN (getdtablesize);
|
_GL_CXXALIASWARN (getdtablesize);
|
||||||
#elif defined GNULIB_POSIXCHECK
|
#elif defined GNULIB_POSIXCHECK
|
||||||
# undef getdtablesize
|
# undef getdtablesize
|
||||||
|
|
|
||||||
24
lib/verify.h
24
lib/verify.h
|
|
@ -250,6 +250,30 @@ template <int w>
|
||||||
|
|
||||||
#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
|
#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
|
||||||
|
|
||||||
|
#ifndef __has_builtin
|
||||||
|
# define __has_builtin(x) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Assume that R always holds. This lets the compiler optimize
|
||||||
|
accordingly. R should not have side-effects; it may or may not be
|
||||||
|
evaluated. Behavior is undefined if R is false. */
|
||||||
|
|
||||||
|
#if (__has_builtin (__builtin_unreachable) \
|
||||||
|
|| 4 < __GNUC__ + (5 <= __GNUC_MINOR__))
|
||||||
|
# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
|
||||||
|
#elif 1200 <= _MSC_VER
|
||||||
|
# define assume(R) __assume (R)
|
||||||
|
#elif (defined lint \
|
||||||
|
&& (__has_builtin (__builtin_trap) \
|
||||||
|
|| 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))))
|
||||||
|
/* Doing it this way helps various packages when configured with
|
||||||
|
--enable-gcc-warnings, which compiles with -Dlint. It's nicer
|
||||||
|
when 'assume' silences warnings even with older GCCs. */
|
||||||
|
# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
|
||||||
|
#else
|
||||||
|
# define assume(R) ((void) (0 && (R)))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* @assert.h omit end@ */
|
/* @assert.h omit end@ */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,9 @@
|
||||||
#ifndef _@GUARD_PREFIX@_WCTYPE_H
|
#ifndef _@GUARD_PREFIX@_WCTYPE_H
|
||||||
#define _@GUARD_PREFIX@_WCTYPE_H
|
#define _@GUARD_PREFIX@_WCTYPE_H
|
||||||
|
|
||||||
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
_GL_INLINE_HEADER_BEGIN
|
_GL_INLINE_HEADER_BEGIN
|
||||||
#ifndef _GL_WCTYPE_INLINE
|
#ifndef _GL_WCTYPE_INLINE
|
||||||
# define _GL_WCTYPE_INLINE _GL_INLINE
|
# define _GL_WCTYPE_INLINE _GL_INLINE
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,9 @@
|
||||||
|
|
||||||
#include "xalloc-oversized.h"
|
#include "xalloc-oversized.h"
|
||||||
|
|
||||||
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
_GL_INLINE_HEADER_BEGIN
|
_GL_INLINE_HEADER_BEGIN
|
||||||
#ifndef XALLOC_INLINE
|
#ifndef XALLOC_INLINE
|
||||||
# define XALLOC_INLINE _GL_INLINE
|
# define XALLOC_INLINE _GL_INLINE
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
_GL_INLINE_HEADER_BEGIN
|
_GL_INLINE_HEADER_BEGIN
|
||||||
#ifndef XSIZE_INLINE
|
#ifndef XSIZE_INLINE
|
||||||
# define XSIZE_INLINE _GL_INLINE
|
# define XSIZE_INLINE _GL_INLINE
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@
|
||||||
#ifndef XTIME_H_
|
#ifndef XTIME_H_
|
||||||
#define XTIME_H_ 1
|
#define XTIME_H_ 1
|
||||||
|
|
||||||
|
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||||
|
#error "Please include config.h first."
|
||||||
|
#endif
|
||||||
_GL_INLINE_HEADER_BEGIN
|
_GL_INLINE_HEADER_BEGIN
|
||||||
#ifndef XTIME_INLINE
|
#ifndef XTIME_INLINE
|
||||||
# define XTIME_INLINE _GL_INLINE
|
# define XTIME_INLINE _GL_INLINE
|
||||||
|
|
|
||||||
102
m4/absolute-header.m4
Normal file
102
m4/absolute-header.m4
Normal file
|
|
@ -0,0 +1,102 @@
|
||||||
|
# absolute-header.m4 serial 16
|
||||||
|
dnl Copyright (C) 2006-2013 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 with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
dnl From Derek Price.
|
||||||
|
|
||||||
|
# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
|
||||||
|
# ---------------------------------------
|
||||||
|
# Find the absolute name of a header file, testing first if the header exists.
|
||||||
|
# If the header were sys/inttypes.h, this macro would define
|
||||||
|
# ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h
|
||||||
|
# in config.h
|
||||||
|
# (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
|
||||||
|
# The three "///" are to pacify Sun C 5.8, which otherwise would say
|
||||||
|
# "warning: #include of /usr/include/... may be non-portable".
|
||||||
|
# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
|
||||||
|
# Note: This macro assumes that the header file is not empty after
|
||||||
|
# preprocessing, i.e. it does not only define preprocessor macros but also
|
||||||
|
# provides some type/enum definitions or function/variable declarations.
|
||||||
|
AC_DEFUN([gl_ABSOLUTE_HEADER],
|
||||||
|
[AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
|
AC_LANG_PREPROC_REQUIRE()dnl
|
||||||
|
dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted
|
||||||
|
dnl until we can assume autoconf 2.64 or newer.
|
||||||
|
m4_foreach_w([gl_HEADER_NAME], [$1],
|
||||||
|
[AS_VAR_PUSHDEF([gl_absolute_header],
|
||||||
|
[gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl
|
||||||
|
AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>],
|
||||||
|
m4_defn([gl_absolute_header]),
|
||||||
|
[AS_VAR_PUSHDEF([ac_header_exists],
|
||||||
|
[ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl
|
||||||
|
AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl
|
||||||
|
if test AS_VAR_GET(ac_header_exists) = yes; then
|
||||||
|
gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME]))
|
||||||
|
fi
|
||||||
|
AS_VAR_POPDEF([ac_header_exists])dnl
|
||||||
|
])dnl
|
||||||
|
AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])),
|
||||||
|
["AS_VAR_GET(gl_absolute_header)"],
|
||||||
|
[Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.])
|
||||||
|
AS_VAR_POPDEF([gl_absolute_header])dnl
|
||||||
|
])dnl
|
||||||
|
])# gl_ABSOLUTE_HEADER
|
||||||
|
|
||||||
|
# gl_ABSOLUTE_HEADER_ONE(HEADER)
|
||||||
|
# ------------------------------
|
||||||
|
# Like gl_ABSOLUTE_HEADER, except that:
|
||||||
|
# - it assumes that the header exists,
|
||||||
|
# - it uses the current CPPFLAGS,
|
||||||
|
# - it does not cache the result,
|
||||||
|
# - it is silent.
|
||||||
|
AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
|
AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])])
|
||||||
|
dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
|
||||||
|
dnl that contain only a #include of other header files and no
|
||||||
|
dnl non-comment tokens of their own. This leads to a failure to
|
||||||
|
dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
|
||||||
|
dnl and others. The workaround is to force preservation of comments
|
||||||
|
dnl through option -C. This ensures all necessary #line directives
|
||||||
|
dnl are present. GCC supports option -C as well.
|
||||||
|
case "$host_os" in
|
||||||
|
aix*) gl_absname_cpp="$ac_cpp -C" ;;
|
||||||
|
*) gl_absname_cpp="$ac_cpp" ;;
|
||||||
|
esac
|
||||||
|
changequote(,)
|
||||||
|
case "$host_os" in
|
||||||
|
mingw*)
|
||||||
|
dnl For the sake of native Windows compilers (excluding gcc),
|
||||||
|
dnl treat backslash as a directory separator, like /.
|
||||||
|
dnl Actually, these compilers use a double-backslash as
|
||||||
|
dnl directory separator, inside the
|
||||||
|
dnl # line "filename"
|
||||||
|
dnl directives.
|
||||||
|
gl_dirsep_regex='[/\\]'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
gl_dirsep_regex='\/'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
dnl A sed expression that turns a string into a basic regular
|
||||||
|
dnl expression, for use within "/.../".
|
||||||
|
gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
|
||||||
|
gl_header_literal_regex=`echo '$1' \
|
||||||
|
| sed -e "$gl_make_literal_regex_sed"`
|
||||||
|
gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
|
||||||
|
s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
|
||||||
|
s|^/[^/]|//&|
|
||||||
|
p
|
||||||
|
q
|
||||||
|
}'
|
||||||
|
changequote([,])
|
||||||
|
dnl eval is necessary to expand gl_absname_cpp.
|
||||||
|
dnl Ultrix and Pyramid sh refuse to redirect output of eval,
|
||||||
|
dnl so use subshell.
|
||||||
|
AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]),
|
||||||
|
[`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
|
||||||
|
sed -n "$gl_absolute_header_sed"`])
|
||||||
|
])
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# configmake.m4 serial 1
|
# configmake.m4 serial 2
|
||||||
dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
|
dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -7,8 +7,9 @@ dnl with or without modifications, as long as this notice is preserved.
|
||||||
# gl_CONFIGMAKE_PREP
|
# gl_CONFIGMAKE_PREP
|
||||||
# ------------------
|
# ------------------
|
||||||
# Guarantee all of the standard directory variables, even when used with
|
# Guarantee all of the standard directory variables, even when used with
|
||||||
# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake
|
# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir
|
||||||
# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.).
|
# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b,
|
||||||
|
# and runstatedir in 1.14.1).
|
||||||
AC_DEFUN([gl_CONFIGMAKE_PREP],
|
AC_DEFUN([gl_CONFIGMAKE_PREP],
|
||||||
[
|
[
|
||||||
dnl Technically, datadir should default to datarootdir. But if
|
dnl Technically, datadir should default to datarootdir. But if
|
||||||
|
|
@ -43,6 +44,10 @@ AC_DEFUN([gl_CONFIGMAKE_PREP],
|
||||||
if test "x$localedir" = x; then
|
if test "x$localedir" = x; then
|
||||||
AC_SUBST([localedir], ['${datarootdir}/locale'])
|
AC_SUBST([localedir], ['${datarootdir}/locale'])
|
||||||
fi
|
fi
|
||||||
|
dnl Added in autoconf 2.70
|
||||||
|
if test "x$runstatedir" = x; then
|
||||||
|
AC_SUBST([runstatedir], ['${localstatedir}/run'])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely
|
dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely
|
||||||
dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
|
dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
|
||||||
|
|
|
||||||
|
|
@ -19,27 +19,41 @@ AC_DEFUN([gl_EXTERN_INLINE],
|
||||||
'reference to static identifier "f" in extern inline function'.
|
'reference to static identifier "f" in extern inline function'.
|
||||||
This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
|
This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
|
||||||
|
|
||||||
Suppress the use of extern inline on Apple's platforms, as Libc at least
|
Suppress the use of extern inline on problematic Apple configurations.
|
||||||
through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g.,
|
OS X 10.8 and earlier mishandle it; see, e.g.,
|
||||||
<http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
|
<http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
|
||||||
|
OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
|
||||||
|
for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
|
||||||
Perhaps Apple will fix this some day. */
|
Perhaps Apple will fix this some day. */
|
||||||
|
#if (defined __APPLE__ \
|
||||||
|
&& (defined __header_inline \
|
||||||
|
? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
|
||||||
|
&& ! defined __clang__) \
|
||||||
|
: ((! defined _DONT_USE_CTYPE_INLINE_ \
|
||||||
|
&& (defined __GNUC__ || defined __cplusplus)) \
|
||||||
|
|| (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
|
||||||
|
&& defined __GNUC__ && ! defined __cplusplus))))
|
||||||
|
# define _GL_EXTERN_INLINE_APPLE_BUG
|
||||||
|
#endif
|
||||||
#if ((__GNUC__ \
|
#if ((__GNUC__ \
|
||||||
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
|
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
|
||||||
: (199901L <= __STDC_VERSION__ \
|
: (199901L <= __STDC_VERSION__ \
|
||||||
&& !defined __HP_cc \
|
&& !defined __HP_cc \
|
||||||
&& !(defined __SUNPRO_C && __STDC__))) \
|
&& !(defined __SUNPRO_C && __STDC__))) \
|
||||||
&& !defined __APPLE__)
|
&& !defined _GL_EXTERN_INLINE_APPLE_BUG)
|
||||||
# define _GL_INLINE inline
|
# define _GL_INLINE inline
|
||||||
# define _GL_EXTERN_INLINE extern inline
|
# define _GL_EXTERN_INLINE extern inline
|
||||||
|
# define _GL_EXTERN_INLINE_IN_USE
|
||||||
#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
|
#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
|
||||||
&& !defined __APPLE__)
|
&& !defined _GL_EXTERN_INLINE_APPLE_BUG)
|
||||||
# if __GNUC_GNU_INLINE__
|
# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
|
||||||
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
|
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
|
||||||
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
|
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
|
||||||
# else
|
# else
|
||||||
# define _GL_INLINE extern inline
|
# define _GL_INLINE extern inline
|
||||||
# endif
|
# endif
|
||||||
# define _GL_EXTERN_INLINE extern
|
# define _GL_EXTERN_INLINE extern
|
||||||
|
# define _GL_EXTERN_INLINE_IN_USE
|
||||||
#else
|
#else
|
||||||
# define _GL_INLINE static _GL_UNUSED
|
# define _GL_INLINE static _GL_UNUSED
|
||||||
# define _GL_EXTERN_INLINE static _GL_UNUSED
|
# define _GL_EXTERN_INLINE static _GL_UNUSED
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ AC_DEFUN([gl_EARLY],
|
||||||
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
|
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
|
||||||
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
|
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
|
||||||
AC_REQUIRE([gl_PROG_AR_RANLIB])
|
AC_REQUIRE([gl_PROG_AR_RANLIB])
|
||||||
|
# Code from module absolute-header:
|
||||||
# Code from module alloca:
|
# Code from module alloca:
|
||||||
# Code from module alloca-opt:
|
# Code from module alloca-opt:
|
||||||
# Code from module argmatch:
|
# Code from module argmatch:
|
||||||
|
|
@ -660,6 +661,7 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||||
lib/xtime.c
|
lib/xtime.c
|
||||||
lib/xtime.h
|
lib/xtime.h
|
||||||
m4/00gnulib.m4
|
m4/00gnulib.m4
|
||||||
|
m4/absolute-header.m4
|
||||||
m4/alloca.m4
|
m4/alloca.m4
|
||||||
m4/argp.m4
|
m4/argp.m4
|
||||||
m4/clock_time.m4
|
m4/clock_time.m4
|
||||||
|
|
|
||||||
|
|
@ -192,56 +192,9 @@ dnl until we can assume autoconf 2.64 or newer.
|
||||||
if test AS_VAR_GET(gl_header_exists) = yes; then
|
if test AS_VAR_GET(gl_header_exists) = yes; then
|
||||||
AS_VAR_POPDEF([gl_header_exists])
|
AS_VAR_POPDEF([gl_header_exists])
|
||||||
])
|
])
|
||||||
AC_LANG_CONFTEST(
|
gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
|
||||||
[AC_LANG_SOURCE(
|
AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
|
||||||
[[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
|
AS_VAR_SET(gl_next_header, ['"'$gl_header'"'])
|
||||||
)])
|
|
||||||
dnl AIX "xlc -E" and "cc -E" omit #line directives for header
|
|
||||||
dnl files that contain only a #include of other header files and
|
|
||||||
dnl no non-comment tokens of their own. This leads to a failure
|
|
||||||
dnl to detect the absolute name of <dirent.h>, <signal.h>,
|
|
||||||
dnl <poll.h> and others. The workaround is to force preservation
|
|
||||||
dnl of comments through option -C. This ensures all necessary
|
|
||||||
dnl #line directives are present. GCC supports option -C as well.
|
|
||||||
case "$host_os" in
|
|
||||||
aix*) gl_absname_cpp="$ac_cpp -C" ;;
|
|
||||||
*) gl_absname_cpp="$ac_cpp" ;;
|
|
||||||
esac
|
|
||||||
changequote(,)
|
|
||||||
case "$host_os" in
|
|
||||||
mingw*)
|
|
||||||
dnl For the sake of native Windows compilers (excluding gcc),
|
|
||||||
dnl treat backslash as a directory separator, like /.
|
|
||||||
dnl Actually, these compilers use a double-backslash as
|
|
||||||
dnl directory separator, inside the
|
|
||||||
dnl # line "filename"
|
|
||||||
dnl directives.
|
|
||||||
gl_dirsep_regex='[/\\]'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
gl_dirsep_regex='\/'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
dnl A sed expression that turns a string into a basic regular
|
|
||||||
dnl expression, for use within "/.../".
|
|
||||||
gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
|
|
||||||
changequote([,])
|
|
||||||
gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \
|
|
||||||
| sed -e "$gl_make_literal_regex_sed"`
|
|
||||||
gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
|
|
||||||
s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
|
|
||||||
changequote(,)dnl
|
|
||||||
s|^/[^/]|//&|
|
|
||||||
changequote([,])dnl
|
|
||||||
p
|
|
||||||
q
|
|
||||||
}'
|
|
||||||
dnl eval is necessary to expand gl_absname_cpp.
|
|
||||||
dnl Ultrix and Pyramid sh refuse to redirect output of eval,
|
|
||||||
dnl so use subshell.
|
|
||||||
AS_VAR_SET(gl_next_header,
|
|
||||||
['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
|
|
||||||
sed -n "$gl_absolute_header_sed"`'"'])
|
|
||||||
m4_if([$2], [check],
|
m4_if([$2], [check],
|
||||||
[else
|
[else
|
||||||
AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
|
AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# unistd_h.m4 serial 66
|
# unistd_h.m4 serial 67
|
||||||
dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
|
dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -160,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
|
||||||
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
|
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
|
||||||
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
|
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
|
||||||
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
|
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
|
||||||
|
REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
|
||||||
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
|
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
|
||||||
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
|
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
|
||||||
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
|
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue