32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
From 0df58ccba1310dcb9e6463f6b3f7e53bdf648e7d Mon Sep 17 00:00:00 2001
|
|
From: Christoph Reiter <reiter.christoph@gmail.com>
|
|
Date: Fri, 23 Jul 2021 08:52:50 +0200
|
|
Subject: [PATCH 046/N] timemodule: add MINGW support
|
|
|
|
---
|
|
Modules/timemodule.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
|
|
index 49626d3..0d071ea 100644
|
|
--- a/Modules/timemodule.c
|
|
+++ b/Modules/timemodule.c
|
|
@@ -41,7 +41,7 @@
|
|
# include <sanitizer/msan_interface.h>
|
|
#endif
|
|
|
|
-#ifdef _MSC_VER
|
|
+#ifdef MS_WINDOWS
|
|
# define _Py_timezone _timezone
|
|
# define _Py_daylight _daylight
|
|
# define _Py_tzname _tzname
|
|
@@ -892,7 +892,7 @@ time_strftime(PyObject *module, PyObject *args)
|
|
//
|
|
// Android works with negative years on the emulator, but fails on some
|
|
// physical devices (#123017).
|
|
-#if defined(_MSC_VER) || (defined(__sun) && defined(__SVR4)) || defined(_AIX) \
|
|
+#if defined(MS_WINDOWS) || (defined(__sun) && defined(__SVR4)) || defined(_AIX) \
|
|
|| defined(__VXWORKS__) || defined(__ANDROID__)
|
|
if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) {
|
|
PyErr_SetString(PyExc_ValueError,
|