Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea424e1

Browse files
committed
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.
1 parent 154fc6d commit ea424e1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Modules/timemodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ inittime()
616616
/* Squirrel away the module's dictionary for the y2k check */
617617
Py_INCREF(d);
618618
moddict = d;
619-
#if defined(HAVE_TZNAME) && !defined(__GNU_LIBRARY__)
619+
#if defined(HAVE_TZNAME) && !defined(__GLIBC__)
620620
tzset();
621621
#ifdef PYOS_OS2
622622
ins(d, "timezone", PyInt_FromLong((long)_timezone));
@@ -634,7 +634,7 @@ inittime()
634634
#endif
635635
ins(d, "daylight", PyInt_FromLong((long)daylight));
636636
ins(d, "tzname", Py_BuildValue("(zz)", tzname[0], tzname[1]));
637-
#else /* !HAVE_TZNAME || __GNU_LIBRARY__ */
637+
#else /* !HAVE_TZNAME || __GLIBC__ */
638638
#ifdef HAVE_TM_ZONE
639639
{
640640
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
@@ -683,7 +683,7 @@ inittime()
683683
ins(d, "tzname", Py_BuildValue("(zz)", "", ""));
684684
#endif /* macintosh */
685685
#endif /* HAVE_TM_ZONE */
686-
#endif /* !HAVE_TZNAME || __GNU_LIBRARY__ */
686+
#endif /* !HAVE_TZNAME || __GLIBC__ */
687687
if (PyErr_Occurred())
688688
Py_FatalError("Can't initialize time module");
689689
}

0 commit comments

Comments
 (0)