[PATCH] strftime: use tzname if TM_ZONE is NULL
Corinna Vinschen
vinschen@redhat.com
Mon Mar 30 19:56:00 GMT 2015
On Mar 30 14:09, Yaakov Selkowitz wrote:
> On Wed, 2015-03-25 at 16:46 -0500, Yaakov Selkowitz wrote:
> > * libc/time/strftime.c (strftime) <%Z>: Initialize tznam to NULL.
> > Use _tzname as fallback if TM_ZONE is NULL.
> > ---
> > The crash was due to a strlen(NULL) a few lines later, which should NOT
> > happen. glibc takes this a step further and calls tzset() if not yet
> > called so that the returned string matches the local timezone (instead
> > of "GMT", or on Cygwin, " "). The question is how to (portably)
> > determine if tzset() has been called already or not (e.g. a global
> > variable?).
>
> Craig's patch would take care of this, so I'd like to repropose this
> patch as is.
Ok.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20150330/47979c2a/attachment.sig>
More information about the Newlib
mailing list