]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
authorGuido van Rossum <guido@python.org>
Mon, 5 Apr 1999 21:54:14 +0000 (21:54 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 5 Apr 1999 21:54:14 +0000 (21:54 +0000)
#else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.

Modules/timemodule.c

index 174b7a8003e3b98b82b664c7b57afb04afe84b03..bd6d7274509c39a77149ec99d955948009e0fc54 100644 (file)
@@ -634,8 +634,8 @@ inittime()
 #endif
        ins(d, "daylight", PyInt_FromLong((long)daylight));
        ins(d, "tzname", Py_BuildValue("(zz)", tzname[0], tzname[1]));
-#else /* !HAVE_TZNAME && !__GNU_LIBRARY__ */
-#if HAVE_TM_ZONE
+#else /* !HAVE_TZNAME || __GNU_LIBRARY__ */
+#ifdef HAVE_TM_ZONE
        {
 #define YEAR ((time_t)((365 * 24 + 6) * 3600))
                time_t t;
@@ -683,7 +683,7 @@ inittime()
        ins(d, "tzname", Py_BuildValue("(zz)", "", ""));
 #endif /* macintosh */
 #endif /* HAVE_TM_ZONE */
-#endif /* !HAVE_TZNAME */
+#endif /* !HAVE_TZNAME || __GNU_LIBRARY__ */
        if (PyErr_Occurred())
                Py_FatalError("Can't initialize time module");
 }