mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Apparently __GNU_LIBRARY__ is defined for glibc as well as for libc5.
The test really wanted to distinguish between the two. So now we test for __GLIBC__ instead. I have confirmed that this works for glibc and I have an email from Christian Tanzer confirming that it works for libc5, so it should be fine.
This commit is contained in:
parent
154fc6dcf7
commit
ea424e19f1
1 changed files with 3 additions and 3 deletions
|
|
@ -616,7 +616,7 @@ inittime()
|
||||||
/* Squirrel away the module's dictionary for the y2k check */
|
/* Squirrel away the module's dictionary for the y2k check */
|
||||||
Py_INCREF(d);
|
Py_INCREF(d);
|
||||||
moddict = d;
|
moddict = d;
|
||||||
#if defined(HAVE_TZNAME) && !defined(__GNU_LIBRARY__)
|
#if defined(HAVE_TZNAME) && !defined(__GLIBC__)
|
||||||
tzset();
|
tzset();
|
||||||
#ifdef PYOS_OS2
|
#ifdef PYOS_OS2
|
||||||
ins(d, "timezone", PyInt_FromLong((long)_timezone));
|
ins(d, "timezone", PyInt_FromLong((long)_timezone));
|
||||||
|
|
@ -634,7 +634,7 @@ inittime()
|
||||||
#endif
|
#endif
|
||||||
ins(d, "daylight", PyInt_FromLong((long)daylight));
|
ins(d, "daylight", PyInt_FromLong((long)daylight));
|
||||||
ins(d, "tzname", Py_BuildValue("(zz)", tzname[0], tzname[1]));
|
ins(d, "tzname", Py_BuildValue("(zz)", tzname[0], tzname[1]));
|
||||||
#else /* !HAVE_TZNAME || __GNU_LIBRARY__ */
|
#else /* !HAVE_TZNAME || __GLIBC__ */
|
||||||
#ifdef HAVE_TM_ZONE
|
#ifdef HAVE_TM_ZONE
|
||||||
{
|
{
|
||||||
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
|
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
|
||||||
|
|
@ -683,7 +683,7 @@ inittime()
|
||||||
ins(d, "tzname", Py_BuildValue("(zz)", "", ""));
|
ins(d, "tzname", Py_BuildValue("(zz)", "", ""));
|
||||||
#endif /* macintosh */
|
#endif /* macintosh */
|
||||||
#endif /* HAVE_TM_ZONE */
|
#endif /* HAVE_TM_ZONE */
|
||||||
#endif /* !HAVE_TZNAME || __GNU_LIBRARY__ */
|
#endif /* !HAVE_TZNAME || __GLIBC__ */
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
Py_FatalError("Can't initialize time module");
|
Py_FatalError("Can't initialize time module");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue