[Python-checkins] r87850 - python/branches/py3k/Modules/timemodule.c

victor.stinner python-checkins at python.org
Sat Jan 8 04:35:36 CET 2011


Author: victor.stinner
Date: Sat Jan  8 04:35:36 2011
New Revision: 87850

Log:
Issue #10864: limit year to [1; 9999] for strftime() on Solaris

Modified:
   python/branches/py3k/Modules/timemodule.c

Modified: python/branches/py3k/Modules/timemodule.c
==============================================================================
--- python/branches/py3k/Modules/timemodule.c	(original)
+++ python/branches/py3k/Modules/timemodule.c	Sat Jan  8 04:35:36 2011
@@ -474,7 +474,7 @@
     else if (!gettmarg(tup, &buf) || !checktm(&buf))
         return NULL;
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(sun)
     if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) {
         PyErr_Format(PyExc_ValueError,
                      "strftime() requires year in [1; 9999]",


More information about the Python-checkins mailing list