Files
MINGW-packages/mingw-w64-python2/0540-mingw-semicolon-DELIM.patch

112 lines
3.1 KiB
Diff

diff -urN a/configure.ac b/configure.ac
--- a/configure.ac 2014-10-11 22:42:45.691190700 +0100
+++ b/configure.ac 2014-10-11 22:42:48.833370500 +0100
@@ -548,6 +548,16 @@
fi
AC_MSG_RESULT($EXTRAPLATDIR)
+# Windows uses ; to separate paths, everything else uses :
+AC_MSG_CHECKING(DELIM)
+DELIM=:
+if test "$MACHDEP" = "win32"
+then
+ DELIM=\;
+fi
+AC_MSG_RESULT([$DELIM])
+AC_SUBST(DELIM)
+
AC_MSG_CHECKING([for init system calls])
AC_SUBST(INITSYS)
case $host in
diff -urN a/Include/osdefs.h b/Include/osdefs.h
--- a/Include/osdefs.h 2014-10-11 22:42:46.013209200 +0100
+++ b/Include/osdefs.h 2014-10-11 22:42:48.835370600 +0100
@@ -10,7 +10,7 @@
/* Mod by chrish: QNX has WATCOM, but isn't DOS */
#if !defined(__QNX__)
#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)
-#if defined(PYOS_OS2) && defined(PYCC_GCC)
+#if (defined(PYOS_OS2) && defined(PYCC_GCC)) || defined(__MINGW32__)
#define MAXPATHLEN 260
#define SEP '/'
#define ALTSEP '\\'
@@ -20,6 +20,7 @@
#define MAXPATHLEN 256
#endif
#define DELIM ';'
+#define DELIMSTR ";"
#endif
#endif
@@ -27,6 +28,7 @@
#define SEP '.'
#define MAXPATHLEN 256
#define DELIM ','
+#define DELIMSTR ","
#endif
@@ -55,6 +57,7 @@
/* Search path entry delimiter */
#ifndef DELIM
#define DELIM ':'
+#define DELIMSTR ":"
#endif
#ifdef __cplusplus
diff -urN a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in 2014-10-11 22:42:45.691190700 +0100
+++ b/Makefile.pre.in 2014-10-11 22:42:48.836370600 +0100
@@ -84,7 +84,8 @@
# C flags used for building the interpreter object files
PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
-
+# ; on Windows otherwise :
+DELIM= @DELIM@
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
diff -urN a/Modules/getpath.c b/Modules/getpath.c
--- a/Modules/getpath.c 2014-10-11 22:42:46.833256100 +0100
+++ b/Modules/getpath.c 2014-10-11 22:42:48.837370700 +0100
@@ -117,7 +117,7 @@
#endif
#ifndef PYTHONPATH
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
+#define PYTHONPATH PREFIX "/lib/python" VERSION DELIMSTR \
EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
#endif
diff -urN a/Modules/Setup.dist b/Modules/Setup.dist
--- a/Modules/Setup.dist 2014-10-11 22:42:46.686247700 +0100
+++ b/Modules/Setup.dist 2014-10-11 22:42:48.838370700 +0100
@@ -84,22 +84,22 @@
# Empty since this is now just the runtime prefix.
DESTPATH=
-# Site specific path components -- should begin with : if non-empty
+# Site specific path components -- should begin with $(DELIM) if non-empty
SITEPATH=
# Standard path components for test modules
TESTPATH=
# Path components for machine- or system-dependent modules and shared libraries
-MACHDEPPATH=:plat-$(MACHDEP)
+MACHDEPPATH=$(DELIM)plat-$(MACHDEP)
EXTRAMACHDEPPATH=
# Path component for the Tkinter-related modules
# The TKPATH variable is always enabled, to save you the effort.
-TKPATH=:lib-tk
+TKPATH=$(DELIM)lib-tk
# Path component for old modules.
-OLDPATH=:lib-old
+OLDPATH=$(DELIM)lib-old
COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH)
PYTHONPATH=$(COREPYTHONPATH)