From 5afb29f59a6f1764eb3059cc0485fb50202afea1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 14 Aug 2020 20:03:33 +0200 Subject: 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. --- lib/nstrftime.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/nstrftime.c b/lib/nstrftime.c index 791fbff7fd..35b65bbbd6 100644 --- a/lib/nstrftime.c +++ b/lib/nstrftime.c @@ -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 @@ -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 (); -- cgit v1.2.1