diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-06-22 10:20:00 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-06-22 10:20:00 -0700 |
commit | 057306483c1c7a9216276c51946406c422d60b70 (patch) | |
tree | f1bf01008eeaf5b20ed7311e64a3fdec783c9bcf | |
parent | b57b344b51c06239b4f3584f9ab946dd48c60bb2 (diff) |
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.
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | lib/filemode.h | 2 | ||||
-rw-r--r-- | lib/signal.in.h | 12 | ||||
-rw-r--r-- | lib/stat.c | 1 | ||||
-rw-r--r-- | lib/stdint.in.h | 2 | ||||
-rw-r--r-- | lib/stdlib.in.h | 4 | ||||
-rw-r--r-- | lib/unistd.in.h | 2 | ||||
-rw-r--r-- | m4/extensions.m4 | 4 | ||||
-rw-r--r-- | m4/getloadavg.m4 | 4 | ||||
-rw-r--r-- | m4/getopt.m4 | 16 | ||||
-rw-r--r-- | m4/gnulib-common.m4 | 4 | ||||
-rw-r--r-- | m4/largefile.m4 | 2 | ||||
-rw-r--r-- | m4/mktime.m4 | 27 | ||||
-rw-r--r-- | m4/multiarch.m4 | 4 | ||||
-rw-r--r-- | m4/nocrash.m4 | 4 | ||||
-rw-r--r-- | m4/stdio_h.m4 | 4 | ||||
-rw-r--r-- | m4/time_r.m4 | 2 |
17 files changed, 65 insertions, 44 deletions
@@ -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 diff --git a/lib/filemode.h b/lib/filemode.h index 9ebef47806..3ca19b8562 100644 --- a/lib/filemode.h +++ b/lib/filemode.h @@ -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 diff --git a/lib/signal.in.h b/lib/signal.in.h index e0f0554bdb..8fb1ad119a 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -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 diff --git a/lib/stat.c b/lib/stat.c index 1fc633eeef..7599540890 100644 --- a/lib/stat.c +++ b/lib/stat.c @@ -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 diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 59c00d59c0..e2a0eb19ac 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -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 diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index b546133c3a..1d67ec64c6 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -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> diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 9115486cf3..e904e512ee 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.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)); diff --git a/m4/extensions.m4 b/m4/extensions.m4 index 0bfaef6f90..6d17d8a748 100644 --- a/m4/extensions.m4 +++ b/m4/extensions.m4 @@ -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 diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index ad09c80d01..029da44b49 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -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], [], diff --git a/m4/getopt.m4 b/m4/getopt.m4 index 2aea89595e..be13337726 100644 --- a/m4/getopt.m4 +++ b/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; ]])], diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index d62b7677ab..15d2b2b3de 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -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__ diff --git a/m4/largefile.m4 b/m4/largefile.m4 index a159f4ab2c..a88850afed 100644 --- a/m4/largefile.m4 +++ b/m4/largefile.m4 @@ -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, diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 5e05dfa697..00ee2dabea 100644 --- a/m4/mktime.m4 +++ b/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 ()) diff --git a/m4/multiarch.m4 b/m4/multiarch.m4 index b424dce652..0c288b8d2a 100644 --- a/m4/multiarch.m4 +++ b/m4/multiarch.m4 @@ -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 diff --git a/m4/nocrash.m4 b/m4/nocrash.m4 index 08ef825499..c2638df626 100644 --- a/m4/nocrash.m4 +++ b/m4/nocrash.m4 @@ -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> diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index b03393b957..5298dd6d9d 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -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 diff --git a/m4/time_r.m4 b/m4/time_r.m4 index c3579fb3b8..9ddbd0199d 100644 --- a/m4/time_r.m4 +++ b/m4/time_r.m4 @@ -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 |