summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2009-02-02 15:32:22 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2009-02-02 15:32:22 (GMT)
commitbc186a87ccd09a62339492cfca794841cab07087 (patch)
treed5e4b2879ff98a6cd04207cf7a6a32506d565903 /PC
parent49db063323c109a854234ccde95f27f1f7e18ad9 (diff)
downloadcpython-bc186a87ccd09a62339492cfca794841cab07087.zip
cpython-bc186a87ccd09a62339492cfca794841cab07087.tar.gz
cpython-bc186a87ccd09a62339492cfca794841cab07087.tar.bz2
Merged revisions 69205 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69205 | martin.v.loewis | 2009-02-02 15:23:16 +0100 (Mo, 02 Feb 2009) | 1 line Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows. ........
Diffstat (limited to 'PC')
-rw-r--r--PC/getpathp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c
index 669ed9f..36abbf2 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -200,6 +200,7 @@ search_for_prefix(wchar_t *argv0_path, wchar_t *landmark)
}
#ifdef MS_WINDOWS
+#ifdef Py_ENABLE_SHARED
/* a string loaded from the DLL at startup.*/
extern const char *PyWin_DLLVersionString;
@@ -349,6 +350,7 @@ done:
free(keyBuf);
return retval;
}
+#endif /* Py_ENABLE_SHARED */
#endif /* MS_WINDOWS */
static void
@@ -359,11 +361,15 @@ get_progpath(void)
wchar_t *prog = Py_GetProgramName();
#ifdef MS_WINDOWS
+#ifdef Py_ENABLE_SHARED
extern HANDLE PyWin_DLLhModule;
/* static init of progpath ensures final char remains \0 */
if (PyWin_DLLhModule)
if (!GetModuleFileNameW(PyWin_DLLhModule, dllpath, MAXPATHLEN))
dllpath[0] = 0;
+#else
+ dllpath[0] = 0;
+#endif
if (GetModuleFileNameW(NULL, progpath, MAXPATHLEN))
return;
#endif
@@ -471,8 +477,10 @@ calculate_path(void)
}
skiphome = pythonhome==NULL ? 0 : 1;
+#ifdef Py_ENABLE_SHARED
machinepath = getpythonregpath(HKEY_LOCAL_MACHINE, skiphome);
userpath = getpythonregpath(HKEY_CURRENT_USER, skiphome);
+#endif
/* We only use the default relative PYTHONPATH if we havent
anything better to use! */
skipdefault = envpath!=NULL || pythonhome!=NULL || \