mktime: Work around TZ problem on native Windows.
commitdb1ee11e2168af7137db53289a92e306d2277b0b
authorBruno Haible <bruno@clisp.org>
Sun, 30 Apr 2017 14:34:54 +0000 (30 16:34 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 30 Apr 2017 17:26:38 +0000 (30 19:26 +0200)
tree2a232e2feff7c79640ba9bab203d58926b728b3e
parent16778a29111e48e1f8f4afa07f77cfc3651c6040
mktime: Work around TZ problem on native Windows.

* lib/mktime.c: Add #ifs to make the algorithmic workaround independent
from the native Windows workaround.
* m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): New macro, extracted from
gl_FUNC_MKTIME. If guessing, set gl_cv_func_working_mktime to
'guessing no'.
(gl_FUNC_MKTIME): Require it. Require AC_CANONICAL_HOST.
Set REPLACE_MKTIME to 1 on native Windows. Define NEED_MKTIME_WORKING,
NEED_MKTIME_WINDOWS.
(gl_FUNC_MKTIME_INTERNAL): Require gl_FUNC_MKTIME_WORKS, not
gl_FUNC_MKTIME. Set WANT_MKTIME_INTERNAL, not REPLACE_MKTIME. Define
NEED_MKTIME_INTERNAL.
* m4/timegm.m4 (gl_FUNC_TIMEGM): Require gl_FUNC_MKTIME_WORKS, not
gl_FUNC_MKTIME. Cope with 'guessing yes' value.
* modules/mktime-internal (configure.ac): Test WANT_MKTIME_INTERNAL,
not REPLACE_MKTIME.
* doc/posix-functions/mktime.texi: Mention the native Windows
workaround.
ChangeLog
doc/posix-functions/mktime.texi
lib/mktime.c
m4/mktime.m4
m4/timegm.m4
modules/mktime-internal