[Python-checkins] gh-79218: Define `MS_WIN64` macro for Mingw-w64 64bit on Windows (GH-100137)

zooba webhook-mailer at python.org
Mon Dec 12 08:39:31 EST 2022


https://github.com/python/cpython/commit/158b8a07212cea6066afe8bb91f1cd542d922dba
commit: 158b8a07212cea6066afe8bb91f1cd542d922dba
branch: main
author: GalaxySnail <me at glxys.nl>
committer: zooba <steve.dower at microsoft.com>
date: 2022-12-12T13:39:23Z
summary:

gh-79218: Define `MS_WIN64` macro for Mingw-w64 64bit on Windows (GH-100137)

files:
A Misc/NEWS.d/next/Windows/2022-12-09-22-47-42.gh-issue-79218.Yiot2e.rst
M PC/pyconfig.h

diff --git a/Misc/NEWS.d/next/Windows/2022-12-09-22-47-42.gh-issue-79218.Yiot2e.rst b/Misc/NEWS.d/next/Windows/2022-12-09-22-47-42.gh-issue-79218.Yiot2e.rst
new file mode 100644
index 000000000000..e2e6ca3c7796
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2022-12-09-22-47-42.gh-issue-79218.Yiot2e.rst
@@ -0,0 +1 @@
+Define ``MS_WIN64`` for Mingw-w64 64bit, fix cython compilation failure.
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 1a33d4c5a1e4..1d8408b363a6 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -209,6 +209,16 @@ typedef int pid_t;
 
 #endif /* _MSC_VER */
 
+/* ------------------------------------------------------------------------*/
+/* mingw and mingw-w64 define __MINGW32__ */
+#ifdef __MINGW32__
+
+#ifdef _WIN64
+#define MS_WIN64
+#endif
+
+#endif /* __MINGW32__*/
+
 /* ------------------------------------------------------------------------*/
 /* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
 #if defined(__GNUC__) && defined(_WIN32)



More information about the Python-checkins mailing list