This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: localtime.cc


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;
>            }
>        }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]