localtime.cc

Pierre A. Humblet Pierre.Humblet@ieee.org
Thu Dec 19 18:01:00 GMT 2002


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



More information about the Cygwin-patches mailing list