bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/7] nstrftime, time_rz: don’t depend on tzname


From: Bruno Haible
Subject: Re: [PATCH 6/7] nstrftime, time_rz: don’t depend on tzname
Date: Tue, 18 Jun 2024 02:47:12 +0200

Paul Eggert wrote:
> Thanks for reporting and fixing that. For NetBSD, a better fix is to use 
> the native timezone_t, so that Gnulib doesn't need to set and later 
> restore TZ.

Interesting. So, we have at least one platform now, where nstrftime is
multithread-safe.

Only an indentation nit:


2024-06-17  Bruno Haible  <bruno@clisp.org>

        nstrftime: Correct indentation.
        * lib/strftime.c (__strftime_internal): Correct indentation of
        preprocessor directives.

diff --git a/lib/strftime.c b/lib/strftime.c
index 2db6603a23..db59d65d05 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -1351,11 +1351,11 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG 
(size_t maxsize)
                 locale_t locale = c_locale ();
                 if (!locale)
                   return 0; /* errno is set here */
-# if HAVE_STRFTIME_LZ
+#  if HAVE_STRFTIME_LZ
                 len = strftime_lz (tz, ubuf, sizeof ubuf, ufmt, tp, locale);
-# else
+#  else
                 len = strftime_l (ubuf, sizeof ubuf, ufmt, tp, locale);
-# endif
+#  endif
 # else
 #  if HAVE_STRFTIME_Z
                 len = strftime_z (tz, ubuf, sizeof ubuf, ufmt, tp);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]