83 lines
2.2 KiB
Diff
83 lines
2.2 KiB
Diff
diff -Naur a/configure.ac b/configure.ac
|
|
--- a/configure.ac 2014-05-20 00:55:07.732000000 +0400
|
|
+++ b/configure.ac 2014-05-20 00:55:08.122000000 +0400
|
|
@@ -2074,6 +2074,9 @@
|
|
CYGWIN*) SHLIB_SUFFIX=.dll;;
|
|
*) SHLIB_SUFFIX=.so;;
|
|
esac
|
|
+ case $host_os in
|
|
+ mingw*) SHLIB_SUFFIX=.dll;;
|
|
+ esac
|
|
fi
|
|
AC_MSG_RESULT($SHLIB_SUFFIX)
|
|
|
|
@@ -3043,6 +3046,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"
|
|
@@ -4276,6 +4285,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 a/Makefile.pre.in b/Makefile.pre.in
|
|
--- a/Makefile.pre.in 2014-05-20 00:54:59.932000000 +0400
|
|
+++ b/Makefile.pre.in 2014-05-20 00:55:08.262400000 +0400
|
|
@@ -731,6 +731,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 a/Python/dynload_win.c b/Python/dynload_win.c
|
|
--- a/Python/dynload_win.c 2014-05-19 09:19:39.000000000 +0400
|
|
+++ b/Python/dynload_win.c 2014-05-20 00:55:08.262400000 +0400
|
|
@@ -18,6 +18,12 @@
|
|
#endif
|
|
|
|
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
|
|
#ifdef _DEBUG
|
|
"_d.pyd",
|
|
#else
|
|
@@ -27,6 +33,10 @@
|
|
};
|
|
|
|
|
|
+#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 */
|
|
|