Blame 0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch

5117e73
diff -rupN Python-2.7.14/Include/pyport.h Python-2.7.14-new/Include/pyport.h
5117e73
--- Python-2.7.14/Include/pyport.h	2017-09-16 19:38:35.000000000 +0200
5117e73
+++ Python-2.7.14-new/Include/pyport.h	2017-10-31 18:36:30.946183541 +0100
ddb6764
@@ -13,6 +13,21 @@
ddb6764
 #include <stdint.h>
ddb6764
 #endif
ddb6764
 
ddb6764
+#ifdef __MINGW32__
ddb6764
+/* Translate GCC[mingw*] platform specific defines to those
ddb6764
+ * used in python code.
ddb6764
+ */
ddb6764
+#if !defined(MS_WIN64) && defined(_WIN64)
ddb6764
+#  define MS_WIN64
ddb6764
+#endif
ddb6764
+#if !defined(MS_WIN32) && defined(_WIN32)
ddb6764
+#  define MS_WIN32
ddb6764
+#endif
ddb6764
+#if !defined(MS_WINDOWS) && defined(MS_WIN32)
ddb6764
+#  define MS_WINDOWS
ddb6764
+#endif
ddb6764
+#endif /*def __MINGW32__*/
ddb6764
+
ddb6764
 /**************************************************************************
ddb6764
 Symbols and macros to supply platform-independent interfaces to basic
ddb6764
 C language & library operations whose spellings vary across platforms.