Merge from gnulib.
* lib/filemode.h, lib/signal.in.h, lib/stat.c, lib/stdint.in.h: * lib/stdlib.in.h, lib/unistd.in.h, m4/extensions.m4, m4/getloadavg.m4: * m4/getopt.m4, m4/gnulib-common.m4, m4/largefile.m4, m4/mktime.m4: * m4/multiarch.m4, m4/nocrash.m4, m4/stdio_h.m4, m4/time_r.m4: Copy new versions from gnulib, incorporating the following changes: 2012-06-22 time_r: fix typo that always overrode localtime_r decl 2012-06-22 Write "Mac OS X" instead of "MacOS X". 2012-06-21 mktime: fix integer overflow in 'configure'-time test 2012-06-21 nonblocking: Avoid compilation error on mingw64. 2012-06-19 stat, fstat: Avoid warnings on mingw64. 2012-06-19 getopt-gnu: Fix exit code overflow in autoconf test.
This commit is contained in:
parent
b57b344b51
commit
057306483c
17 changed files with 65 additions and 44 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Merge from gnulib.
|
||||
* lib/filemode.h, lib/signal.in.h, lib/stat.c, lib/stdint.in.h:
|
||||
* lib/stdlib.in.h, lib/unistd.in.h, m4/extensions.m4, m4/getloadavg.m4:
|
||||
* m4/getopt.m4, m4/gnulib-common.m4, m4/largefile.m4, m4/mktime.m4:
|
||||
* m4/multiarch.m4, m4/nocrash.m4, m4/stdio_h.m4, m4/time_r.m4:
|
||||
Copy new versions from gnulib, incorporating the following changes:
|
||||
2012-06-22 time_r: fix typo that always overrode localtime_r decl
|
||||
2012-06-22 Write "Mac OS X" instead of "MacOS X".
|
||||
2012-06-21 mktime: fix integer overflow in 'configure'-time test
|
||||
2012-06-21 nonblocking: Avoid compilation error on mingw64.
|
||||
2012-06-19 stat, fstat: Avoid warnings on mingw64.
|
||||
2012-06-19 getopt-gnu: Fix exit code overflow in autoconf test.
|
||||
|
||||
2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* configure.in: Rename --enable-use-lisp-union-type to
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
/* Get the declaration of strmode. */
|
||||
# if HAVE_DECL_STRMODE
|
||||
# include <string.h> /* MacOS X, FreeBSD, OpenBSD */
|
||||
# include <string.h> /* Mac OS X, FreeBSD, OpenBSD */
|
||||
# include <unistd.h> /* NetBSD */
|
||||
# endif
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#ifndef _@GUARD_PREFIX@_SIGNAL_H
|
||||
#define _@GUARD_PREFIX@_SIGNAL_H
|
||||
|
||||
/* MacOS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
|
||||
/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
|
||||
pthread_sigmask in <pthread.h>, not in <signal.h>.
|
||||
But avoid namespace pollution on glibc systems.*/
|
||||
#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
|
||||
|
@ -197,7 +197,7 @@ typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
|
|||
|
||||
/* Test whether a given signal is contained in a signal set. */
|
||||
# if @HAVE_POSIX_SIGNALBLOCKING@
|
||||
/* This function is defined as a macro on MacOS X. */
|
||||
/* This function is defined as a macro on Mac OS X. */
|
||||
# if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
# undef sigismember
|
||||
# endif
|
||||
|
@ -210,7 +210,7 @@ _GL_CXXALIASWARN (sigismember);
|
|||
|
||||
/* Initialize a signal set to the empty set. */
|
||||
# if @HAVE_POSIX_SIGNALBLOCKING@
|
||||
/* This function is defined as a macro on MacOS X. */
|
||||
/* This function is defined as a macro on Mac OS X. */
|
||||
# if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
# undef sigemptyset
|
||||
# endif
|
||||
|
@ -222,7 +222,7 @@ _GL_CXXALIASWARN (sigemptyset);
|
|||
|
||||
/* Add a signal to a signal set. */
|
||||
# if @HAVE_POSIX_SIGNALBLOCKING@
|
||||
/* This function is defined as a macro on MacOS X. */
|
||||
/* This function is defined as a macro on Mac OS X. */
|
||||
# if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
# undef sigaddset
|
||||
# endif
|
||||
|
@ -235,7 +235,7 @@ _GL_CXXALIASWARN (sigaddset);
|
|||
|
||||
/* Remove a signal from a signal set. */
|
||||
# if @HAVE_POSIX_SIGNALBLOCKING@
|
||||
/* This function is defined as a macro on MacOS X. */
|
||||
/* This function is defined as a macro on Mac OS X. */
|
||||
# if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
# undef sigdelset
|
||||
# endif
|
||||
|
@ -248,7 +248,7 @@ _GL_CXXALIASWARN (sigdelset);
|
|||
|
||||
/* Fill a signal set with all possible signals. */
|
||||
# if @HAVE_POSIX_SIGNALBLOCKING@
|
||||
/* This function is defined as a macro on MacOS X. */
|
||||
/* This function is defined as a macro on Mac OS X. */
|
||||
# if defined __cplusplus && defined GNULIB_NAMESPACE
|
||||
# undef sigfillset
|
||||
# endif
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
|
||||
# if _GL_WINDOWS_64_BIT_ST_SIZE
|
||||
# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
|
||||
# define stat _stati64
|
||||
# define REPLACE_FUNC_STAT_DIR 1
|
||||
# undef REPLACE_FUNC_STAT_FILE
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
|
||||
IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
|
||||
AIX 5.2 <sys/types.h> isn't needed and causes troubles.
|
||||
MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
|
||||
Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
|
||||
relies on the system <stdint.h> definitions, so include
|
||||
<sys/types.h> after @NEXT_STDINT_H@. */
|
||||
#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
|
||||
|
|
|
@ -87,8 +87,8 @@ struct random_data
|
|||
#endif
|
||||
|
||||
#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
|
||||
/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
|
||||
/* On MacOS X 10.5, only <unistd.h> declares mkstemps. */
|
||||
/* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
|
||||
/* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
|
||||
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
|
||||
/* But avoid namespace pollution on glibc systems and native Windows. */
|
||||
# include <unistd.h>
|
||||
|
|
|
@ -1318,7 +1318,7 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
|
|||
_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
/* Need to cast, because on Solaris 11 2011-10, MacOS X 10.5, IRIX 6.5
|
||||
/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
|
||||
and FreeBSD 6.4 the second parameter is int. On Solaris 11
|
||||
2011-10, the first parameter is not const. */
|
||||
_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# serial 11 -*- Autoconf -*-
|
||||
# serial 12 -*- Autoconf -*-
|
||||
# Enable extensions on systems that normally disable them.
|
||||
|
||||
# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
|
||||
|
@ -67,7 +67,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
|
|||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on MacOS X. */
|
||||
/* Enable general extensions on Mac OS X. */
|
||||
#ifndef _DARWIN_C_SOURCE
|
||||
# undef _DARWIN_C_SOURCE
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 5
|
||||
#serial 6
|
||||
|
||||
# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
|
||||
# New applications should use gl_GETLOADAVG instead.
|
||||
|
@ -22,7 +22,7 @@ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
|
|||
|
||||
gl_save_LIBS=$LIBS
|
||||
|
||||
# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
|
||||
# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
|
||||
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
|
||||
HAVE_GETLOADAVG=1
|
||||
AC_CHECK_FUNC([getloadavg], [],
|
||||
|
|
16
m4/getopt.m4
16
m4/getopt.m4
|
@ -1,4 +1,4 @@
|
|||
# getopt.m4 serial 39
|
||||
# getopt.m4 serial 41
|
||||
dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -173,7 +173,7 @@ main ()
|
|||
if (!(optind == 1))
|
||||
return 12;
|
||||
}
|
||||
/* Detect MacOS 10.5, AIX 7.1 bug. */
|
||||
/* Detect Mac OS X 10.5, AIX 7.1 bug. */
|
||||
{
|
||||
static char program[] = "program";
|
||||
static char ab[] = "-ab";
|
||||
|
@ -236,7 +236,7 @@ dnl is ambiguous with environment values that contain newlines.
|
|||
nocrash_init();
|
||||
|
||||
/* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
|
||||
and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
|
||||
and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
|
||||
OSF/1 5.1, Solaris 10. */
|
||||
{
|
||||
static char conftest[] = "conftest";
|
||||
|
@ -247,7 +247,7 @@ dnl is ambiguous with environment values that contain newlines.
|
|||
result |= 1;
|
||||
}
|
||||
/* This code succeeds on glibc 2.8, mingw,
|
||||
and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
|
||||
and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
|
||||
IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
|
||||
{
|
||||
static char program[] = "program";
|
||||
|
@ -276,7 +276,7 @@ dnl is ambiguous with environment values that contain newlines.
|
|||
if (getopt (3, argv, "-p") != 1)
|
||||
result |= 16;
|
||||
else if (getopt (3, argv, "-p") != 'p')
|
||||
result |= 32;
|
||||
result |= 16;
|
||||
}
|
||||
/* This code fails on glibc 2.11. */
|
||||
{
|
||||
|
@ -286,9 +286,9 @@ dnl is ambiguous with environment values that contain newlines.
|
|||
char *argv[] = { program, b, a, NULL };
|
||||
optind = opterr = 0;
|
||||
if (getopt (3, argv, "+:a:b") != 'b')
|
||||
result |= 64;
|
||||
result |= 32;
|
||||
else if (getopt (3, argv, "+:a:b") != ':')
|
||||
result |= 64;
|
||||
result |= 32;
|
||||
}
|
||||
/* This code dumps core on glibc 2.14. */
|
||||
{
|
||||
|
@ -298,7 +298,7 @@ dnl is ambiguous with environment values that contain newlines.
|
|||
char *argv[] = { program, w, dummy, NULL };
|
||||
optind = opterr = 1;
|
||||
if (getopt (3, argv, "W;") != 'W')
|
||||
result |= 128;
|
||||
result |= 64;
|
||||
}
|
||||
return result;
|
||||
]])],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# gnulib-common.m4 serial 32
|
||||
# gnulib-common.m4 serial 33
|
||||
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -30,7 +30,7 @@ AC_DEFUN([gl_COMMON_BODY], [
|
|||
[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
|
||||
the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
|
||||
earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
|
||||
__APPLE__ && __MACH__ test for MacOS X.
|
||||
__APPLE__ && __MACH__ test for Mac OS X.
|
||||
__APPLE_CC__ tests for the Apple compiler and its version.
|
||||
__STDC_VERSION__ tests for the C99 mode. */
|
||||
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
|
||||
|
|
|
@ -136,7 +136,7 @@ AC_DEFUN([gl_LARGEFILE],
|
|||
*)
|
||||
dnl Nothing to do on gnulib's side.
|
||||
dnl A 64-bit off_t is
|
||||
dnl - already the default on MacOS X, FreeBSD, NetBSD, OpenBSD, IRIX,
|
||||
dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX,
|
||||
dnl OSF/1, Cygwin,
|
||||
dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
|
||||
dnl glibc, HP-UX, Solaris,
|
||||
|
|
27
m4/mktime.m4
27
m4/mktime.m4
|
@ -1,4 +1,4 @@
|
|||
# serial 21
|
||||
# serial 23
|
||||
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
|
@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_MKTIME],
|
|||
AC_CHECK_FUNCS_ONCE([alarm])
|
||||
AC_REQUIRE([gl_MULTIARCH])
|
||||
if test $APPLE_UNIVERSAL_BUILD = 1; then
|
||||
# A universal build on Apple MacOS X platforms.
|
||||
# A universal build on Apple Mac OS X platforms.
|
||||
# The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
|
||||
# But we need a configuration result that is valid in both modes.
|
||||
gl_cv_func_working_mktime=no
|
||||
|
@ -192,20 +192,23 @@ main ()
|
|||
if (tz_strings[i])
|
||||
putenv (tz_strings[i]);
|
||||
|
||||
for (t = 0; t <= time_t_max - delta; t += delta)
|
||||
for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
|
||||
if (! mktime_test (t))
|
||||
result |= 1;
|
||||
if (! (mktime_test ((time_t) 1)
|
||||
&& mktime_test ((time_t) (60 * 60))
|
||||
&& mktime_test ((time_t) (60 * 60 * 24))))
|
||||
if ((result & 2) == 0
|
||||
&& ! (mktime_test ((time_t) 1)
|
||||
&& mktime_test ((time_t) (60 * 60))
|
||||
&& mktime_test ((time_t) (60 * 60 * 24))))
|
||||
result |= 2;
|
||||
|
||||
for (j = 1; ; j <<= 1)
|
||||
if (! bigtime_test (j))
|
||||
result |= 4;
|
||||
else if (INT_MAX / 2 < j)
|
||||
break;
|
||||
if (! bigtime_test (INT_MAX))
|
||||
for (j = 1; (result & 4) == 0; j <<= 1)
|
||||
{
|
||||
if (! bigtime_test (j))
|
||||
result |= 4;
|
||||
if (INT_MAX / 2 < j)
|
||||
break;
|
||||
}
|
||||
if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
|
||||
result |= 8;
|
||||
}
|
||||
if (! irix_6_4_bug ())
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# multiarch.m4 serial 6
|
||||
# multiarch.m4 serial 7
|
||||
dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
|
|||
|
||||
# Determine whether the compiler is or may be producing universal binaries.
|
||||
#
|
||||
# On MacOS X 10.5 and later systems, the user can create libraries and
|
||||
# On Mac OS X 10.5 and later systems, the user can create libraries and
|
||||
# executables that work on multiple system types--known as "fat" or
|
||||
# "universal" binaries--by specifying multiple '-arch' options to the
|
||||
# compiler but only a single '-arch' option to the preprocessor. Like
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# nocrash.m4 serial 3
|
||||
# nocrash.m4 serial 4
|
||||
dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -18,7 +18,7 @@ dnl int main() { nocrash_init(); ... }
|
|||
AC_DEFUN([GL_NOCRASH],[[
|
||||
#include <stdlib.h>
|
||||
#if defined __MACH__ && defined __APPLE__
|
||||
/* Avoid a crash on MacOS X. */
|
||||
/* Avoid a crash on Mac OS X. */
|
||||
#include <mach/mach.h>
|
||||
#include <mach/mach_error.h>
|
||||
#include <mach/thread_status.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# stdio_h.m4 serial 41
|
||||
# stdio_h.m4 serial 42
|
||||
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -13,7 +13,9 @@ AC_DEFUN([gl_STDIO_H],
|
|||
dnl No need to create extra modules for these functions. Everyone who uses
|
||||
dnl <stdio.h> likely needs them.
|
||||
GNULIB_FSCANF=1
|
||||
gl_MODULE_INDICATOR([fscanf])
|
||||
GNULIB_SCANF=1
|
||||
gl_MODULE_INDICATOR([scanf])
|
||||
GNULIB_FGETC=1
|
||||
GNULIB_GETC=1
|
||||
GNULIB_GETCHAR=1
|
||||
|
|
|
@ -17,7 +17,7 @@ AC_DEFUN([gl_TIME_R],
|
|||
|
||||
dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is
|
||||
dnl not defined.
|
||||
AC_CHECK_DECLS_ONCE([localtime_r])
|
||||
AC_CHECK_DECLS([localtime_r], [], [], [[#include <time.h>]])
|
||||
if test $ac_cv_have_decl_localtime_r = no; then
|
||||
HAVE_DECL_LOCALTIME_R=0
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue