From 6b0e51a08c66e5b4da4c1cc1fe35f99efa102cdc Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Wed, 3 Jun 2009 05:19:18 +0000 Subject: [PATCH] Issue #6183: Disables wcsftime on VC6. --- Modules/timemodule.c | 2 +- PC/pyconfig.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/timemodule.c b/Modules/timemodule.c index d524ac549aa..d8db4095701 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -540,7 +540,7 @@ time_strftime(PyObject *self, PyObject *args) fmt = PyBytes_AS_STRING(format); #endif -#ifdef MS_WINDOWS +#if defined(MS_WINDOWS) && defined(HAVE_WCSFTIME) /* check that the format string contains only valid directives */ for(outbuf = wcschr(fmt, L'%'); outbuf != NULL; diff --git a/PC/pyconfig.h b/PC/pyconfig.h index d76846fe403..3c3c6f49eb7 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -638,7 +638,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ /* #undef HAVE_WAITPID */ /* Define to 1 if you have the `wcsftime' function. */ +#if defined(_MSC_VER) && _MSC_VER >= 1310 #define HAVE_WCSFTIME 1 +#endif /* Define to 1 if you have the `wcscoll' function. */ #ifndef MS_WINCE