[Patches] [ python-Patches-459385 ] 2.1.1 time.timezone fix for Cygwin
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 25 Sep 2001 06:47:54 -0700
Patches item #459385, was opened at 2001-09-06 18:27
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=459385&group_id=5470
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Norman Vine (nhv)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: 2.1.1 time.timezone fix for Cygwin
Initial Comment:
*** timemodule.bak Wed Jun 27 09:01:54 2001
--- timemodule.c Thu Sep 6 20:29:28 2001
***************
*** 599,605 ****
/* Squirrel away the module's dictionary for
the y2k check */
Py_INCREF(d);
moddict = d;
! #if defined(HAVE_TZNAME) && !defined(__GLIBC__)
tzset();
#ifdef PYOS_OS2
ins(d, "timezone", PyInt_FromLong((long)
_timezone));
--- 599,605 ----
/* Squirrel away the module's dictionary for
the y2k check */
Py_INCREF(d);
moddict = d;
! #if defined(HAVE_TZNAME) && !defined(__GLIBC__) &&!
defined(__CYGWIN__)
tzset();
#ifdef PYOS_OS2
ins(d, "timezone", PyInt_FromLong((long)
_timezone));
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-25 06:47
Message:
Logged In: YES
user_id=6380
Reassigned to me -- Barry's a black hole for patches.
----------------------------------------------------------------------
Comment By: Jason Tishler (jlt63)
Date: 2001-09-25 06:46
Message:
Logged In: YES
user_id=86216
Any status? This issue is starting to affect more and more users.
If one examines the patch, it is clear that the only platform affected is Cygwin.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2001-09-13 19:20
Message:
Logged In: YES
user_id=31435
Reassigned to Barry. Cygwin patches are more likely to
break the Unixish builds than the Windows build (& this one
in particular appears to have nothing to do with the "win"
part of "Cygwin").
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-13 19:11
Message:
Logged In: YES
user_id=6380
We'll work on it. Give us some time.
----------------------------------------------------------------------
Comment By: Norman Vine (nhv)
Date: 2001-09-13 17:38
Message:
Logged In: YES
user_id=1020
Could we please get either Jason's or my patch into the
current source tree. AFAICT both work eaqually well
Note AFAIK
This is the last change we need for a Cygwin compiled
Python running on Win2k to pass 100% of the make test
regression suite :-)
Thanks
Norman Vine
----------------------------------------------------------------------
Comment By: Jason Tishler (jlt63)
Date: 2001-09-13 17:14
Message:
Logged In: YES
user_id=86216
Argh! I guess that I can mail the patch to Norman and then ask him to upload it...
----------------------------------------------------------------------
Comment By: Jason Tishler (jlt63)
Date: 2001-09-13 17:11
Message:
Logged In: YES
user_id=86216
[I guess that there is not a way to upload a patch if you are not the submitter?]
I concur that this patch should be accepted. However, I offer the following
slightly more aesthetic, but otherwise functionality identical patch:
Index: timemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
retrieving revision 2.113
diff -c -r2.113 timemodule.c
*** timemodule.c 2001/08/22 12:39:16 2.113
--- timemodule.c 2001/09/13 17:54:27
***************
*** 599,605 ****
/* Squirrel away the module's dictionary for the y2k check */
Py_INCREF(d);
moddict = d;
! #if defined(HAVE_TZNAME) && !defined(__GLIBC__)
tzset();
#ifdef PYOS_OS2
ins(d, "timezone", PyInt_FromLong((long)_timezone));
--- 599,605 ----
/* Squirrel away the module's dictionary for the y2k check */
Py_INCREF(d);
moddict = d;
! #if defined(HAVE_TZNAME) && !defined(__GLIBC__) && !defined(__CYGWIN__)
tzset();
#ifdef PYOS_OS2
ins(d, "timezone", PyInt_FromLong((long)_timezone));
***************
*** 617,623 ****
#endif
ins(d, "daylight", PyInt_FromLong((long)daylight));
ins(d, "tzname", Py_BuildValue("(zz)", tzname[0], tzname[1]));
! #else /* !HAVE_TZNAME || __GLIBC__ */
#ifdef HAVE_TM_ZONE
{
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
--- 617,623 ----
#endif
ins(d, "daylight", PyInt_FromLong((long)daylight));
ins(d, "tzname", Py_BuildValue("(zz)", tzname[0], tzname[1]));
! #else /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
#ifdef HAVE_TM_ZONE
{
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
***************
*** 673,679 ****
ins(d, "daylight", PyInt_FromLong(_daylight));
ins(d, "tzname", Py_BuildValue("(zz)", _tzname[0], _tzname[1]));
#endif /* __CYGWIN__ */
! #endif /* !HAVE_TZNAME || __GLIBC__ */
}
--- 673,679 ----
ins(d, "daylight", PyInt_FromLong(_daylight));
ins(d, "tzname", Py_BuildValue("(zz)", _tzname[0], _tzname[1]));
#endif /* __CYGWIN__ */
! #endif /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
}
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=459385&group_id=5470