81 lines
2.4 KiB
Diff
81 lines
2.4 KiB
Diff
diff -Naur Python-3.5.2-orig/configure.ac Python-3.5.2/configure.ac
|
|
--- Python-3.5.2-orig/configure.ac 2016-07-12 14:21:09.091800700 +0300
|
|
+++ Python-3.5.2/configure.ac 2016-07-12 14:21:09.347800700 +0300
|
|
@@ -2397,6 +2397,9 @@
|
|
CYGWIN*) SHLIB_SUFFIX=.dll;;
|
|
*) SHLIB_SUFFIX=.so;;
|
|
esac
|
|
+ case $host_os in
|
|
+ mingw*) SHLIB_SUFFIX=.dll;;
|
|
+ esac
|
|
fi
|
|
AC_MSG_RESULT($SHLIB_SUFFIX)
|
|
|
|
@@ -3397,6 +3400,12 @@
|
|
fi
|
|
;;
|
|
esac
|
|
+ case $host in
|
|
+ *-*-mingw*)
|
|
+ DYNLOADFILE="dynload_win.o"
|
|
+ extra_machdep_objs="$extra_machdep_objs PC/dl_nt.o"
|
|
+ ;;
|
|
+ esac
|
|
fi
|
|
AC_MSG_RESULT($DYNLOADFILE)
|
|
if test "$DYNLOADFILE" != "dynload_stub.o"
|
|
@@ -4644,6 +4653,12 @@
|
|
*)
|
|
EXT_SUFFIX=${SHLIB_SUFFIX};;
|
|
esac
|
|
+case $host_os in
|
|
+ mingw*)
|
|
+ dnl Synchronized with _PyImport_DynLoadFiletab (dynload_win.c)
|
|
+ dnl Do not use more then one dot on this platform !
|
|
+ EXT_SUFFIX=-$SOABI$SHLIB_SUFFIX;;
|
|
+esac
|
|
|
|
AC_MSG_CHECKING(LDVERSION)
|
|
LDVERSION='$(VERSION)$(ABIFLAGS)'
|
|
diff -Naur Python-3.5.2-orig/Makefile.pre.in Python-3.5.2/Makefile.pre.in
|
|
--- Python-3.5.2-orig/Makefile.pre.in 2016-07-12 14:21:05.319800700 +0300
|
|
+++ Python-3.5.2/Makefile.pre.in 2016-07-12 14:21:09.366300700 +0300
|
|
@@ -789,6 +789,12 @@
|
|
-DSHLIB_EXT='"$(EXT_SUFFIX)"' \
|
|
-o $@ $(srcdir)/Python/dynload_hpux.c
|
|
|
|
+Python/dynload_win.o: $(srcdir)/Python/dynload_win.c Makefile
|
|
+ $(CC) -c $(PY_CORE_CFLAGS) \
|
|
+ -DSHLIB_SUFFIX='"$(SHLIB_SUFFIX)"' \
|
|
+ -DEXT_SUFFIX='"$(EXT_SUFFIX)"' \
|
|
+ -o $@ $(srcdir)/Python/dynload_win.c
|
|
+
|
|
Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
|
|
$(CC) -c $(PY_CORE_CFLAGS) \
|
|
-DABIFLAGS='"$(ABIFLAGS)"' \
|
|
diff -Naur Python-3.5.2-orig/Python/dynload_win.c Python-3.5.2/Python/dynload_win.c
|
|
--- Python-3.5.2-orig/Python/dynload_win.c 2016-06-26 00:38:38.000000000 +0300
|
|
+++ Python-3.5.2/Python/dynload_win.c 2016-07-12 14:21:09.386300700 +0300
|
|
@@ -35,11 +35,21 @@
|
|
#define PYD_UNTAGGED_SUFFIX PYD_DEBUG_SUFFIX ".pyd"
|
|
|
|
const char *_PyImport_DynLoadFiletab[] = {
|
|
+#ifdef EXT_SUFFIX
|
|
+ EXT_SUFFIX, /* include SOABI flags where is encoded debug */
|
|
+#endif
|
|
+#ifdef SHLIB_SUFFIX
|
|
+ "-abi" PYTHON_ABI_STRING SHLIB_SUFFIX,
|
|
+#endif
|
|
PYD_TAGGED_SUFFIX,
|
|
PYD_UNTAGGED_SUFFIX,
|
|
NULL
|
|
};
|
|
|
|
+#if defined(__MINGW32__)
|
|
+/* avoid compile error: conflicting types for 'strcasecmp' */
|
|
+# define strcasecmp fake_strcasecmp
|
|
+#endif
|
|
/* Case insensitive string compare, to avoid any dependencies on particular
|
|
C RTL implementations */
|
|
|