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 /m4 | |
parent | b57b344b51c06239b4f3584f9ab946dd48c60bb2 (diff) | |
download | emacs-057306483c1c7a9216276c51946406c422d60b70.tar.gz |
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.
Diffstat (limited to 'm4')
-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 |
10 files changed, 38 insertions, 33 deletions
diff --git a/m4/extensions.m4 b/m4/extensions.m4 index 0bfaef6f904..6d17d8a748b 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 ad09c80d01c..029da44b497 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 2aea89595ee..be13337726d 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 d62b7677ab9..15d2b2b3dea 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 a159f4ab2ce..a88850afedc 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 5e05dfa697e..00ee2dabea5 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 b424dce652b..0c288b8d2a9 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 08ef825499a..c2638df626c 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 b03393b957b..5298dd6d9d5 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 c3579fb3b89..9ddbd0199d5 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 |