From: Bruno Haible Date: Fri, 14 Aug 2020 18:02:07 +0000 (+0200) Subject: mktime, mktime-internal: Assume tzset exists. X-Git-Tag: v1.0~3771 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=424bb97793e96c63c090e9dbf2d442a38e367c94;p=gnulib.git mktime, mktime-internal: Assume tzset exists. * lib/mktime.c (my_tzset): Assume HAVE_TZSET is 1. * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Don't test for tzset. --- diff --git a/ChangeLog b/ChangeLog index 8b0f287063..65070d7fd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-08-14 Bruno Haible + + mktime, mktime-internal: Assume tzset exists. + * lib/mktime.c (my_tzset): Assume HAVE_TZSET is 1. + * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Don't test for tzset. + 2020-08-14 Bruno Haible strdup: Assume the function exists. diff --git a/lib/mktime.c b/lib/mktime.c index c8735164f6..600148795b 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -94,7 +94,7 @@ my_tzset (void) const char *tz = getenv ("TZ"); if (tz != NULL && strchr (tz, '/') != NULL) _putenv ("TZ="); -# elif HAVE_TZSET +# else tzset (); # endif } diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 8d9b827fe2..afc8a8762d 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,4 +1,4 @@ -# serial 32 +# serial 33 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -31,7 +31,6 @@ AC_DEFUN([gl_FUNC_MKTIME_WORKS], dnl in Autoconf and because it invokes AC_LIBOBJ. AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_DECLS_ONCE([alarm]) - AC_CHECK_FUNCS_ONCE([tzset]) AC_REQUIRE([gl_MULTIARCH]) AC_CACHE_CHECK([for working mktime], [gl_cv_func_working_mktime], [if test $APPLE_UNIVERSAL_BUILD = 1; then