[Python-checkins] r69208 - in python/branches/release30-maint: Misc/NEWS PC/getpathp.c

martin.v.loewis python-checkins at python.org
Mon Feb 2 16:34:13 CET 2009


Author: martin.v.loewis
Date: Mon Feb  2 16:34:12 2009
New Revision: 69208

Log:
Merged revisions 69207 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r69207 | martin.v.loewis | 2009-02-02 16:32:22 +0100 (Mo, 02 Feb 2009) | 9 lines
  
  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.
  ........
................


Modified:
   python/branches/release30-maint/   (props changed)
   python/branches/release30-maint/Misc/NEWS
   python/branches/release30-maint/PC/getpathp.c

Modified: python/branches/release30-maint/Misc/NEWS
==============================================================================
--- python/branches/release30-maint/Misc/NEWS	(original)
+++ python/branches/release30-maint/Misc/NEWS	Mon Feb  2 16:34:12 2009
@@ -252,6 +252,8 @@
 Build
 -----
 
+- Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows.
+
 - Issue #4472: "configure --enable-shared" now works on OSX
 
 - Issues #4728 and #4060: WORDS_BIGEDIAN is now correct in Universal builds.

Modified: python/branches/release30-maint/PC/getpathp.c
==============================================================================
--- python/branches/release30-maint/PC/getpathp.c	(original)
+++ python/branches/release30-maint/PC/getpathp.c	Mon Feb  2 16:34:12 2009
@@ -200,6 +200,7 @@
 }
 
 #ifdef MS_WINDOWS
+#ifdef Py_ENABLE_SHARED
 
 /* a string loaded from the DLL at startup.*/
 extern const char *PyWin_DLLVersionString;
@@ -349,6 +350,7 @@
 		free(keyBuf);
 	return retval;
 }
+#endif /* Py_ENABLE_SHARED */
 #endif /* MS_WINDOWS */
 
 static void
@@ -359,11 +361,15 @@
 	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 @@
 	}
  
 	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 || \


More information about the Python-checkins mailing list