June 21, 2023
2:16 a.m.
( the Archives of this thread seem incomplete.) On 6/20/23 15:00:29, enh via tz wrote:
... We could rename 'struct state', but I'm a bit lost as to what the problem is, as I don't see mention of 'state' or 'timezone_t' in openbsd/lib/libc/time/wcsftime.c. Although there is a 'struct state' in openbsd/lib/libc/time/localtime.c I assume you're replacing that with tzcode's localtime.c somehow.
(Replying mostly to the Subject:) A thread-safe localtime() seems impractical. localtime() depends on the environment variable TZ. If concurrent threads set different values of TZ the results will be unpredictable. The same applies to localtime_r(). -- gil