File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -375,6 +375,8 @@ Tools/Demos
375375Build
376376-----
377377
378+ - Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows.
379+
378380- Issue #4895: Use _strdup on Windows CE.
379381
380382- Issue #4472: "configure --enable-shared" now works on OSX
Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ search_for_prefix(wchar_t *argv0_path, wchar_t *landmark)
200200}
201201
202202#ifdef MS_WINDOWS
203+ #ifdef Py_ENABLE_SHARED
203204
204205/* a string loaded from the DLL at startup.*/
205206extern const char * PyWin_DLLVersionString ;
@@ -349,6 +350,7 @@ getpythonregpath(HKEY keyBase, int skipcore)
349350 free (keyBuf );
350351 return retval ;
351352}
353+ #endif /* Py_ENABLE_SHARED */
352354#endif /* MS_WINDOWS */
353355
354356static void
@@ -359,11 +361,15 @@ get_progpath(void)
359361 wchar_t * prog = Py_GetProgramName ();
360362
361363#ifdef MS_WINDOWS
364+ #ifdef Py_ENABLE_SHARED
362365 extern HANDLE PyWin_DLLhModule ;
363366 /* static init of progpath ensures final char remains \0 */
364367 if (PyWin_DLLhModule )
365368 if (!GetModuleFileNameW (PyWin_DLLhModule , dllpath , MAXPATHLEN ))
366369 dllpath [0 ] = 0 ;
370+ #else
371+ dllpath [0 ] = 0 ;
372+ #endif
367373 if (GetModuleFileNameW (NULL , progpath , MAXPATHLEN ))
368374 return ;
369375#endif
@@ -471,8 +477,10 @@ calculate_path(void)
471477 }
472478
473479 skiphome = pythonhome == NULL ? 0 : 1 ;
480+ #ifdef Py_ENABLE_SHARED
474481 machinepath = getpythonregpath (HKEY_LOCAL_MACHINE , skiphome );
475482 userpath = getpythonregpath (HKEY_CURRENT_USER , skiphome );
483+ #endif
476484 /* We only use the default relative PYTHONPATH if we havent
477485 anything better to use! */
478486 skipdefault = envpath != NULL || pythonhome != NULL || \
You can’t perform that action at this time.
0 commit comments