This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Invalid tm_zone from localtime() when TZ is not set
- From: KOBAYASHI Shinji <koba at jp dot fujitsu dot com>
- To: <cygwin at cygwin dot com>
- Date: Thu, 26 May 2016 21:11:42 +0900
- Subject: Re: Invalid tm_zone from localtime() when TZ is not set
- Authentication-results: sourceware.org; auth=none
- References: <o8xeg8x7e2r dot wl-koba at jp dot fujitsu dot com> <932D033F-9DA4-4901-9158-328AA929FEC8 at etr-usa dot com> <o8x8tz573zs dot wl-koba at jp dot fujitsu dot com> <CAEhDDbA-ATpAtVggR7cfqn58AHw0sPK_Y3mNSJ8UO29sg2ZpuA at mail dot gmail dot com> <o8x37pd6nlm dot wl-koba at jp dot fujitsu dot com> <o8xposa6fcl dot wl-koba at jp dot fujitsu dot com> <20160525084430 dot GA17601 at calimero dot vinschen dot de> <2eddaaf6-4e37-cd9b-aa9d-8a87234d0cf9 at t-online dot de> <o8xh9dltilz dot wl-koba at jp dot fujitsu dot com> <20160526102303 dot GD8416 at calimero dot vinschen dot de>
On Thu, 26 May 2016 12:23:03 +0200, Corinna Vinschen wrote:
> > > A proper solution may have to be more like this:
> > > int mapped = wctob(*src);
> > > /* this call is safe now because of how wctob() works: */
> > > if (isupper(mapped)) {
> > > *dst++ = (unsigned char)mapped;
> > > }
> >
> > Thank you for pointing out wctob(). I'm in favor of fixing this way.
> I fixed it already in the repo using explicit testing for
> L'A' <= wchar <= L'Z', see
> https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=030d86d04dbd6ae878ff894256c5a465890d5970
Okay, thanks. I confirmed that the problem does not happen with
current master.
Best regards,
KOBAYASHI Shinji.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple