summaryrefslogtreecommitdiff
path: root/m4/gettimeofday.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-05-01 15:33:06 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-05-01 15:33:26 -0700
commit634d0a907ff7ba5901dfe3624e58d718f3f37cec (patch)
tree6bf86cf04d8b28a79693df9cdef1063c9b06ca76 /m4/gettimeofday.m4
parent16b49e214ad828de29ceb57ad1b443eece9bba03 (diff)
downloademacs-634d0a907ff7ba5901dfe3624e58d718f3f37cec.tar.gz
Merge from gnulib
This incorporates: 2017-05-01 New module 'localtime-buffer' 2017-04-30 utimens: Add support for native Windows * admin/merge-gnulib (AVOIDED_MODULES): Add tzset. * configure.ac (tzset): No need for Emacs itself to check now. * lib/gettimeofday.c, lib/time.in.h, lib/time_rz.c, lib/utimens.c: * m4/gettimeofday.m4, m4/time_h.m4, m4/time_rz.m4: Copy from gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/localtime-buffer.c, lib/localtime-buffer.h: * m4/localtime-buffer.m4: New files, copied from gnulib. * src/editfns.c (init_editfns): Assume tzset is callable.
Diffstat (limited to 'm4/gettimeofday.m4')
-rw-r--r--m4/gettimeofday.m421
1 files changed, 2 insertions, 19 deletions
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 742b6c9e10e..34adc64778f 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -54,19 +54,6 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict);
if test $REPLACE_STRUCT_TIMEVAL = 1; then
REPLACE_GETTIMEOFDAY=1
fi
- m4_ifdef([gl_FUNC_TZSET_CLOBBER], [
- gl_FUNC_TZSET_CLOBBER
- case "$gl_cv_func_tzset_clobber" in
- *yes)
- REPLACE_GETTIMEOFDAY=1
- gl_GETTIMEOFDAY_REPLACE_LOCALTIME
- AC_DEFINE([tzset], [rpl_tzset],
- [Define to rpl_tzset if the wrapper function should be used.])
- AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
- [Define if tzset clobbers localtime's static buffer.])
- ;;
- esac
- ])
fi
AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
[Define this to 'void' or 'struct timezone' to match the system's
@@ -85,6 +72,7 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
[
AC_REQUIRE([gl_HEADER_SYS_TIME_H])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
[gl_cv_func_gettimeofday_clobber],
@@ -119,17 +107,12 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
case "$gl_cv_func_gettimeofday_clobber" in
*yes)
REPLACE_GETTIMEOFDAY=1
- gl_GETTIMEOFDAY_REPLACE_LOCALTIME
AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
[Define if gettimeofday clobbers the localtime buffer.])
+ gl_LOCALTIME_BUFFER_NEEDED
;;
esac
])
-AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
- REPLACE_GMTIME=1
- REPLACE_LOCALTIME=1
-])
-
# Prerequisites of lib/gettimeofday.c.
AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:])