From: Anthony Baxter Date: Thu, 1 Nov 2001 13:14:43 +0000 (+0000) Subject: backport of 2.114: X-Git-Tag: v2.1.2c1~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39103a210cc54ed3dc82ab9f9704dbda2ddb099e;p=thirdparty%2FPython%2Fcpython.git backport of 2.114: SF patch #459385 (Norman Vine): time.timezone fix for Cygwin. (skipped whitespace normalisation section of patch - this is a bugfix, not a beauty contest :) --- diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 0a54a9384787..7002fcfd77e2 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -599,7 +599,7 @@ inittime(void) /* Squirrel away the module's dictionary for the y2k check */ Py_INCREF(d); moddict = d; -#if defined(HAVE_TZNAME) && !defined(__GLIBC__) +#if defined(HAVE_TZNAME) && !defined(__GLIBC__) && !defined(__CYGWIN__) tzset(); #ifdef PYOS_OS2 ins(d, "timezone", PyInt_FromLong((long)_timezone)); @@ -617,7 +617,7 @@ inittime(void) #endif ins(d, "daylight", PyInt_FromLong((long)daylight)); ins(d, "tzname", Py_BuildValue("(zz)", tzname[0], tzname[1])); -#else /* !HAVE_TZNAME || __GLIBC__ */ +#else /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/ #ifdef HAVE_TM_ZONE { #define YEAR ((time_t)((365 * 24 + 6) * 3600)) @@ -673,7 +673,7 @@ inittime(void) ins(d, "daylight", PyInt_FromLong(_daylight)); ins(d, "tzname", Py_BuildValue("(zz)", _tzname[0], _tzname[1])); #endif /* __CYGWIN__ */ -#endif /* !HAVE_TZNAME || __GLIBC__ */ +#endif /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/ }