Blame 0540-mingw-semicolon-DELIM.patch

5117e73
diff -rupN Python-2.7.14/configure.ac Python-2.7.14-new/configure.ac
5117e73
--- Python-2.7.14/configure.ac	2017-10-31 18:36:37.058181890 +0100
5117e73
+++ Python-2.7.14-new/configure.ac	2017-10-31 18:36:37.061181889 +0100
5117e73
@@ -557,6 +557,16 @@ then
ddb6764
 fi
ddb6764
 AC_MSG_RESULT($EXTRAPLATDIR)
ddb6764
 
ddb6764
+# Windows uses ; to separate paths, everything else uses :
ddb6764
+AC_MSG_CHECKING(DELIM)
ddb6764
+DELIM=:
ddb6764
+if test "$MACHDEP" = "win32"
ddb6764
+then
ddb6764
+	DELIM=\;
ddb6764
+fi
ddb6764
+AC_MSG_RESULT([$DELIM])
ddb6764
+AC_SUBST(DELIM)
ddb6764
+
ddb6764
 AC_MSG_CHECKING([for init system calls])
ddb6764
 AC_SUBST(INITSYS)
ddb6764
 case $host in
5117e73
diff -rupN Python-2.7.14/Include/osdefs.h Python-2.7.14-new/Include/osdefs.h
5117e73
--- Python-2.7.14/Include/osdefs.h	2017-09-16 19:38:35.000000000 +0200
5117e73
+++ Python-2.7.14-new/Include/osdefs.h	2017-10-31 18:36:37.061181889 +0100
ddb6764
@@ -10,7 +10,7 @@ extern "C" {
ddb6764
 /* Mod by chrish: QNX has WATCOM, but isn't DOS */
ddb6764
 #if !defined(__QNX__)
ddb6764
 #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)
ddb6764
-#if defined(PYOS_OS2) && defined(PYCC_GCC)
ddb6764
+#if (defined(PYOS_OS2) && defined(PYCC_GCC)) || defined(__MINGW32__)
ddb6764
 #define MAXPATHLEN 260
ddb6764
 #define SEP '/'
ddb6764
 #define ALTSEP '\\'
ddb6764
@@ -20,6 +20,7 @@ extern "C" {
ddb6764
 #define MAXPATHLEN 256
ddb6764
 #endif
ddb6764
 #define DELIM ';'
ddb6764
+#define DELIMSTR ";"
ddb6764
 #endif
ddb6764
 #endif
ddb6764
 
ddb6764
@@ -27,6 +28,7 @@ extern "C" {
ddb6764
 #define SEP '.'
ddb6764
 #define MAXPATHLEN 256
ddb6764
 #define DELIM ','
ddb6764
+#define DELIMSTR ","
ddb6764
 #endif
ddb6764
 
ddb6764
 
ddb6764
@@ -55,6 +57,7 @@ extern "C" {
ddb6764
 /* Search path entry delimiter */
ddb6764
 #ifndef DELIM
ddb6764
 #define DELIM ':'
ddb6764
+#define DELIMSTR ":"
ddb6764
 #endif
ddb6764
 
ddb6764
 #ifdef __cplusplus
5117e73
diff -rupN Python-2.7.14/Makefile.pre.in Python-2.7.14-new/Makefile.pre.in
5117e73
--- Python-2.7.14/Makefile.pre.in	2017-10-31 18:36:36.582182015 +0100
5117e73
+++ Python-2.7.14-new/Makefile.pre.in	2017-10-31 18:36:37.062181889 +0100
5117e73
@@ -88,7 +88,8 @@ CFLAGSFORSHARED=@CFLAGSFORSHARED@
ddb6764
 # C flags used for building the interpreter object files
ddb6764
 PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
ddb6764
 
ddb6764
-
ddb6764
+# ; on Windows otherwise :
ddb6764
+DELIM=		@DELIM@
ddb6764
 # Machine-dependent subdirectories
ddb6764
 MACHDEP=	@MACHDEP@
ddb6764
 
5117e73
diff -rupN Python-2.7.14/Modules/Setup.dist Python-2.7.14-new/Modules/Setup.dist
5117e73
--- Python-2.7.14/Modules/Setup.dist	2017-10-31 18:36:32.523183104 +0100
5117e73
+++ Python-2.7.14-new/Modules/Setup.dist	2017-10-31 18:36:37.062181889 +0100
ddb6764
@@ -84,22 +84,22 @@ MACHDESTLIB=$(BINLIBDEST)
ddb6764
 # Empty since this is now just the runtime prefix.
ddb6764
 DESTPATH=
ddb6764
 
ddb6764
-# Site specific path components -- should begin with : if non-empty
ddb6764
+# Site specific path components -- should begin with $(DELIM) if non-empty
ddb6764
 SITEPATH=
ddb6764
 
ddb6764
 # Standard path components for test modules
ddb6764
 TESTPATH=
ddb6764
 
ddb6764
 # Path components for machine- or system-dependent modules and shared libraries
ddb6764
-MACHDEPPATH=:$(PLATDIR)
ddb6764
+MACHDEPPATH=$(DELIM)$(PLATDIR)
ddb6764
 EXTRAMACHDEPPATH=
ddb6764
 
ddb6764
 # Path component for the Tkinter-related modules
ddb6764
 # The TKPATH variable is always enabled, to save you the effort.
ddb6764
-TKPATH=:lib-tk
ddb6764
+TKPATH=$(DELIM)lib-tk
ddb6764
 
ddb6764
 # Path component for old modules.
ddb6764
-OLDPATH=:lib-old
ddb6764
+OLDPATH=$(DELIM)lib-old
ddb6764
 
ddb6764
 COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH)
ddb6764
 PYTHONPATH=$(COREPYTHONPATH)