Hello Paul,
Gnulib’s ‘mktime’ replacement gets used on glibc systems (glibc 2.22
here) due to ‘__mktime_internal’ being unavailable, even though
gl_cv_func_working_mktime=yes on these systems. Is this intended?
Furthermore, lib/mktime.c has this:
--8<---------------cut here---------------start------------->8---
time_t
mktime (struct tm *tp)
{
#ifdef _LIBC
/* POSIX.1 8.1.1 requires that whenever mktime() is called, the
time zone names contained in the external variable 'tzname' shall
be set as if the tzset() function had been called. */
__tzset ();
#endif
return __mktime_internal (tp, __localtime_r, &localtime_offset);
}
--8<---------------cut here---------------end--------------->8---
I believe “#ifdef _LIBC” should be changed to something like:
--8<---------------cut here---------------start------------->8---
#ifdef _LIBC
__tzset ();
#else
tzset ();
#endif
--8<---------------cut here---------------end--------------->8---
otherwise the current ‘TZ’ variable value ends up being ignored (we
noticed this problem with Guile’s test suite.)
WDYT?
Thanks,
Ludo’.