summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-03-12 17:38:42 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-03-12 17:38:42 -0700
commit5615c9a9af487c19ab0bd30cb15d7bdb9af53560 (patch)
treeda5460962adeb04d0b5589f388a52a129095a41b /m4
parent84c3ab6860d2247e0da13d418545807a5f2f90fc (diff)
downloademacs-5615c9a9af487c19ab0bd30cb15d7bdb9af53560.tar.gz
Merge from gnulib.
This incorporates: 2013-03-12 mktime: fix configure typo 2013-03-11 regex: port to mingw's recent addition of undeclared alarm 2013-03-11 putenv: avoid compilation warning on mingw 2013-03-11 unistd: don't prevent Tru64 Unix from using gnulib strtod.
Diffstat (limited to 'm4')
-rw-r--r--m4/mktime.m411
1 files changed, 7 insertions, 4 deletions
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index d3d376a4e2c..faefb770092 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,4 +1,4 @@
-# serial 24
+# serial 25
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -14,7 +14,7 @@ AC_DEFUN([gl_FUNC_MKTIME],
dnl We don't use AC_FUNC_MKTIME any more, because it is no longer maintained
dnl in Autoconf and because it invokes AC_LIBOBJ.
AC_CHECK_HEADERS_ONCE([unistd.h])
- AC_CHECK_FUNCS_ONCE([alarm])
+ AC_CHECK_DECLS_ONCE([alarm])
AC_REQUIRE([gl_MULTIARCH])
if test $APPLE_UNIVERSAL_BUILD = 1; then
# A universal build on Apple Mac OS X platforms.
@@ -34,8 +34,8 @@ AC_DEFUN([gl_FUNC_MKTIME],
# include <unistd.h>
#endif
-#ifndef HAVE_ALARM
-# define alarm(X) /* empty */
+#if HAVE_DECL_ALARM
+# include <signal.h>
#endif
/* Work around redefinition to rpl_putenv by other config tests. */
@@ -171,10 +171,13 @@ main ()
int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
int time_t_signed = ! ((time_t) 0 < (time_t) -1);
+#if HAVE_DECL_ALARM
/* This test makes some buggy mktime implementations loop.
Give up after 60 seconds; a mktime slower than that
isn't worth using anyway. */
+ signal (SIGALRM, SIG_DFL);
alarm (60);
+#endif
time_t_max = (! time_t_signed
? (time_t) -1