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

Skip to content

Commit 6b0e51a

Browse files
author
Hirokazu Yamamoto
committed
Issue #6183: Disables wcsftime on VC6.
1 parent 3db5e7b commit 6b0e51a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Modules/timemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ time_strftime(PyObject *self, PyObject *args)
540540
fmt = PyBytes_AS_STRING(format);
541541
#endif
542542

543-
#ifdef MS_WINDOWS
543+
#if defined(MS_WINDOWS) && defined(HAVE_WCSFTIME)
544544
/* check that the format string contains only valid directives */
545545
for(outbuf = wcschr(fmt, L'%');
546546
outbuf != NULL;

PC/pyconfig.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
638638
/* #undef HAVE_WAITPID */
639639

640640
/* Define to 1 if you have the `wcsftime' function. */
641+
#if defined(_MSC_VER) && _MSC_VER >= 1310
641642
#define HAVE_WCSFTIME 1
643+
#endif
642644

643645
/* Define to 1 if you have the `wcscoll' function. */
644646
#ifndef MS_WINCE

0 commit comments

Comments
 (0)