]> Savannah Git Hosting - gnulib.git/commitdiff
nstrftime: Assume tzset exists.
authorBruno Haible <bruno@clisp.org>
Fri, 14 Aug 2020 18:03:33 +0000 (20:03 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 14 Aug 2020 18:03:33 +0000 (20:03 +0200)
* lib/nstrftime.c (HAVE_TZSET): Remove macro.
(__strftime_internal): Test my_strftime, not HAVE_TZSET.
* m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Don't test for tzset.

ChangeLog
lib/nstrftime.c
m4/nstrftime.m4

index 65070d7fd0c939103074f64e9d05602be717fcda..803c67d4287011e7bf13cae120bbadfc9586dac6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2020-08-14  Bruno Haible  <bruno@clisp.org>
 
+       nstrftime: Assume tzset exists.
+       * lib/nstrftime.c (HAVE_TZSET): Remove macro.
+       (__strftime_internal): Test my_strftime, not HAVE_TZSET.
+       * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Don't test for tzset.
+
        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.
index 791fbff7fdb06754cdfa0cafdce4c401b4e7bc88..35b65bbbd6ca599e434ec9e9115d43ecc2d4bd80 100644 (file)
@@ -21,7 +21,6 @@
 # define HAVE_TM_GMTOFF 1
 # define HAVE_TM_ZONE 1
 # define HAVE_TZNAME 1
-# define HAVE_TZSET 1
 # include "../locale/localeinfo.h"
 #else
 # include <config.h>
@@ -389,7 +388,6 @@ iso_week_days (int yday, int wday)
 #endif
 
 #ifdef my_strftime
-# undef HAVE_TZSET
 # define extra_args , tz, ns
 # define extra_args_spec , timezone_t tz, int ns
 #else
@@ -523,7 +521,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
     {
       /* POSIX.1 requires that local time zone information be used as
          though strftime called tzset.  */
-# if HAVE_TZSET
+# ifndef my_strftime
       if (!*tzset_called)
         {
           tzset ();
@@ -1417,7 +1415,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
 
                 /* POSIX.1 requires that local time zone information be used as
                    though strftime called tzset.  */
-# if HAVE_TZSET
+# ifndef my_strftime
                 if (!*tzset_called)
                   {
                     tzset ();
index 6f2762aa2766723c74900c6a0231807e5a3afe11..e4eb87de0b9ae118544d8f3f427b6d519cdc7656 100644 (file)
@@ -1,4 +1,4 @@
-# serial 35
+# serial 36
 
 # Copyright (C) 1996-1997, 1999-2007, 2009-2020 Free Software Foundation, Inc.
 #
@@ -17,8 +17,6 @@ AC_DEFUN([gl_FUNC_GNU_STRFTIME],
 
  AC_REQUIRE([gl_TM_GMTOFF])
 
- AC_CHECK_FUNCS_ONCE([tzset])
-
  AC_DEFINE([my_strftime], [nstrftime],
    [Define to the name of the strftime replacement function.])
 ])