On 2024-06-18 06:02, Bruno Haible wrote:
tz=NULL means universal time (a.k.a. GMT) in our strftime.h, but is undefined
behaviour for NetBSD's functions.
Thanks for the fix. I tweaked it via the attached. The "0" at the end of
"UTC0" is better if the zoneinfo files are missing.From 562ed134d6cf
Paul Eggert wrote:
> > After the Solaris crash fix, the nstrftime tests still fail, due to this
> > output:
> >
> > <-00>0: expected "1970-01-01 00:00:00 - (-00)", got "1970-01-01
> > 00:00:00 + (-00)"
> > <-00>0: expected "1985-11-05 00:53:21 - (-00)", got "1985-11-05
> > 00:53:21 +
On 2024-06-17 07:51, Bruno Haible wrote:
After the Solaris crash fix, the nstrftime tests still fail, due to this
output:
<-00>0: expected "1970-01-01 00:00:00 - (-00)", got "1970-01-01 00:00:00 +
(-00)"
<-00>0: expected "1985-11-05 00:53:21 - (-00)", got "1985-11-05 00:53:21 +
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:
2
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. I attempted to do by installing the attached.From 17432773bb157fe9bd11137edd42cd7be35e1dea Mon Sep 17 00:00:00 2001
From: Paul Eggert
Date: Mon
After the Solaris crash fix, the nstrftime tests still fail, due to this
output:
<-00>0: expected "1970-01-01 00:00:00 - (-00)", got "1970-01-01 00:00:00
+ (-00)"
<-00>0: expected "1985-11-05 00:53:21 - (-00)", got "1985-11-05 00:53:21
+ (-00)"
<-00>0: expected "2001-09-09 01:46:
Paul Eggert did:
> (__strftime_internal): Simplify calculation of zone to be closer
> to what glibc does.
This causes 4 test suite failures on Solaris 11.4, from a null pointer
reference:
FAIL: test-c-nstrftime-1.sh
===
../../gltests/test-c-nstrftime-1.sh: line 3: 9936: M
Paul Eggert did:
> (set_tz, revert_tz): Declare, as they’re now extern.
This causes link errors on NetBSD 10 (caught by the CI):
gcc -Wno-error -g -O2 -L/home/bruno/lib -L/usr/pkg/lib -o test-c-nstrftime
test-c-nstrftime.o libtests.a ../gllib/libgnu.a libtests.a ../gllib/libgnu.a
libtests.a
* lib/strftime.c (HAVE_TZNAME_ARRAY) [_LIBC]: Remove.
All uses removed.
(__strftime_internal): Simplify calculation of zone to be closer
to what glibc does. However, in Gnulib do not look at tzname as
this is problematic for all the usual reasons; instead, use the
underlying strftime with %Z, maki