]> Savannah Git Hosting - gnulib.git/commit
time_rz: port better to MinGW
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 27 Jul 2015 23:41:17 +0000 (16:41 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 27 Jul 2015 23:42:10 +0000 (16:42 -0700)
commitd3bc69175327902b416f9bcde1cbc06793125a9a
treea185a0ee768d5ab17db7bcc7a12f449516f71b2a
parentb18e6d98e211be6bb0e720952a9baef7da1d27cb
time_rz: port better to MinGW

Don't change tzname, as this makes MinGW dump core (Bug#21020).
Instead, store the tzname copy in the struct tm_zone object.
Problem reported by Eli Zaretskii in: http://bugs.gnu.org/21020#48
* lib/strftime.c [!_LIBC]:
* lib/time_rz.c: Include time-internal.h.
* lib/strftime.c (strftime_case_) [!HAVE_TM_ZONE]: Infer the zone
name from *TZ rather than from TZNAME, doable because *TZ now has
a tzname_copy member.
* lib/time-internal.h: New file, with contents taken from
lib/time_rz.c.  It's separate because strftime.c now accesses
struct tm_zone members.
(struct tm_zone) [HAVE_TZNAME && !HAVE_TM_ZONE]:
New member tzname_copy.
* lib/time_rz.c (struct tm_zone): Move to time-internal.h.
(tzalloc) [HAVE_TZNAME && !HAVE_TM_ZONE]:
Initialize tzname_copy member.
(save_abbr) [HAVE_TZNAME && !HAVE_TM_ZONE]: Save abbreviation
in tzname_copy member.
(revert_tz) [HAVE_TZNAME]: Remove no-longer-needed tzname saving.
(restore_tzname): Remove; no longer needed.  All calls removed.
* modules/time_rz (Files): Add lib/time-internal.h.
ChangeLog
lib/strftime.c
lib/time-internal.h [new file with mode: 0644]
lib/time_rz.c
modules/time_rz