summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-06-30 15:26:10 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-06-30 15:26:10 (GMT)
commit6238d2b024f061159b2613387ff700695c10deef (patch)
tree2c882431a5f1a348c7b4589f0e51a7e0d8bdef46 /PC
parentadfa7409f8286bd9581d5decfac5a5edcc1aa7de (diff)
downloadcpython-6238d2b024f061159b2613387ff700695c10deef.zip
cpython-6238d2b024f061159b2613387ff700695c10deef.tar.gz
cpython-6238d2b024f061159b2613387ff700695c10deef.tar.bz2
Patch #569753: Remove support for WIN16.
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
Diffstat (limited to 'PC')
-rw-r--r--PC/getpathp.c22
-rw-r--r--PC/pyconfig.h9
2 files changed, 12 insertions, 19 deletions
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 @@ search_for_prefix(char *argv0_path, char *landmark)
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 @@ done:
free(keyBuf);
return retval;
}
-#endif /* MS_WIN32 */
+#endif /* MS_WINDOWS */
static void
get_progpath(void)
@@ -349,7 +349,7 @@ get_progpath(void)
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 @@ calculate_path(void)
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 @@ calculate_path(void)
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 @@ calculate_path(void)
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 @@ calculate_path(void)
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 @@ calculate_path(void)
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 @@ calculate_path(void)
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 code specific to Windows should be wrapped around one of
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 @@ compiler specific". Therefore, these should be very rare.
#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 @@ typedef int pid_t;
/* #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