Patch #569753: Remove support for WIN16.
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
diff --git a/PC/getpathp.c b/PC/getpathp.c
index 6695a70..e2d4e7a 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -57,7 +57,7 @@
#include "Python.h"
#include "osdefs.h"
-#ifdef MS_WIN32
+#ifdef MS_WINDOWS
#include <windows.h>
#include <tchar.h>
#endif
@@ -182,7 +182,7 @@
return 0;
}
-#ifdef MS_WIN32
+#ifdef MS_WINDOWS
/* a string loaded from the DLL at startup.*/
extern const char *PyWin_DLLVersionString;
@@ -340,7 +340,7 @@
free(keyBuf);
return retval;
}
-#endif /* MS_WIN32 */
+#endif /* MS_WINDOWS */
static void
get_progpath(void)
@@ -349,7 +349,7 @@
char *path = getenv("PATH");
char *prog = Py_GetProgramName();
-#ifdef MS_WIN32
+#ifdef MS_WINDOWS
#ifdef UNICODE
WCHAR wprogpath[MAXPATHLEN+1];
/* Windows documents that GetModuleFileName() will "truncate",
@@ -423,7 +423,7 @@
char *pythonhome = Py_GetPythonHome();
char *envpath = Py_GETENV("PYTHONPATH");
-#ifdef MS_WIN32
+#ifdef MS_WINDOWS
int skiphome, skipdefault;
char *machinepath = NULL;
char *userpath = NULL;
@@ -446,7 +446,7 @@
envpath = NULL;
-#ifdef MS_WIN32
+#ifdef MS_WINDOWS
skiphome = pythonhome==NULL ? 0 : 1;
machinepath = getpythonregpath(HKEY_LOCAL_MACHINE, skiphome);
userpath = getpythonregpath(HKEY_CURRENT_USER, skiphome);
@@ -482,7 +482,7 @@
bufsz = 0;
bufsz += strlen(PYTHONPATH) + 1;
bufsz += strlen(argv0_path) + 1;
-#ifdef MS_WIN32
+#ifdef MS_WINDOWS
if (userpath)
bufsz += strlen(userpath) + 1;
if (machinepath)
@@ -503,12 +503,12 @@
fprintf(stderr, "Using default static path.\n");
module_search_path = PYTHONPATH;
}
-#ifdef MS_WIN32
+#ifdef MS_WINDOWS
if (machinepath)
free(machinepath);
if (userpath)
free(userpath);
-#endif /* MS_WIN32 */
+#endif /* MS_WINDOWS */
return;
}
@@ -517,7 +517,7 @@
buf = strchr(buf, '\0');
*buf++ = DELIM;
}
-#ifdef MS_WIN32
+#ifdef MS_WINDOWS
if (userpath) {
strcpy(buf, userpath);
buf = strchr(buf, '\0');
@@ -541,7 +541,7 @@
strcpy(buf, PYTHONPATH);
buf = strchr(buf, '\0');
}
-#endif /* MS_WIN32 */
+#endif /* MS_WINDOWS */
else {
char *p = PYTHONPATH;
char *q;
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 893db43..ac043eb 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -12,8 +12,7 @@
the following #defines
MS_WIN64 - Code specific to the MS Win64 API
-MS_WIN32 - Code specific to the MS Win32 (and Win64) API
-MS_WIN16 - Code specific to the old 16 bit Windows API.
+MS_WIN32 - Code specific to the MS Win32 (and Win64) API (obsolete, this covers all supported APIs)
MS_WINDOWS - Code specific to Windows, but all versions.
MS_COREDLL - Code if the Python core is built as a DLL.
@@ -65,9 +64,6 @@
#define NT /* NT is obsolete - please use MS_WIN32 instead */
#define MS_WIN32
#endif
-#ifdef _WIN16
-#define MS_WIN16
-#endif
#define MS_WINDOWS
/* set the COMPILER */
@@ -451,10 +447,7 @@
/* #define HAVE_ALTZONE */
/* Define if you have the putenv function. */
-#ifdef MS_WIN32
-/* Does this exist on Win16? */
#define HAVE_PUTENV
-#endif
/* Define if your compiler supports function prototypes */
#define HAVE_PROTOTYPES