This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: localtime.cc
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 19 Dec 2002 21:11:25 -0500
- Subject: Re: localtime.cc
- References: <3.0.5.32.20021219210102.0080d840@mail.attbi.com>
- Reply-to: cygwin-patches at cygwin dot com
Go ahead and check this in.
Thanks.
cgf
On Thu, Dec 19, 2002 at 09:01:02PM -0500, Pierre A. Humblet wrote:
>While I am at it, there is also this one. It's an improvement, not
>a bug fix, cutting down on tzset trashing around as visible in strace.
>
>Pierre
>
>2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>
>
> * localtime.cc (tzsetwall): Set lcl_is_set and lcl_TZname
> in the Cygwin specific part of the routine.
>
>Index: localtime.cc
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/localtime.cc,v
>retrieving revision 1.7
>diff -u -p -r1.7 localtime.cc
>--- localtime.cc 23 Sep 2002 00:31:30 -0000 1.7
>+++ localtime.cc 20 Dec 2002 01:53:34 -0000
>@@ -1451,7 +1451,9 @@ tzsetwall P((void))
> /* printf("TZ deduced as `%s'\n", buf); */
> if (tzparse(buf, lclptr, FALSE) == 0) {
> settzname();
>- setenv("TZ", buf, 1);
>+ lcl_is_set = 1;
>+ strlcpy(lcl_TZname, buf, sizeof (lcl_TZname));
>+ setenv("TZ", lcl_TZname, 1);
> return;
> }
> }