Index: Modules/timemodule.c =================================================================== --- Modules/timemodule.c (revision 73159) +++ Modules/timemodule.c (working copy) @@ -540,7 +540,7 @@ 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; Index: PC/pyconfig.h =================================================================== --- PC/pyconfig.h (revision 73159) +++ PC/pyconfig.h (working copy) @@ -638,7 +638,9 @@ /* #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