Bug 433790 - Win16 support should be deleted from NSPR; (Jv2a) prlink.c: a s/_WIN32/XP_OS2/ rewrite; r=(wtc + mozilla%Weilbacher.org)
authorsgautherie.bz%free.fr
Fri, 07 Aug 2009 18:53:16 +0000
changeset 4141 d0d80711f78bd77754608383cb38e50a238767a7
parent 4140 1e2b1c27388a9cdc2d922854a5d72c47d853994b
child 4142 2a06d9ff73135cd59a53f04f5e8e72e2f82771c2
push idunknown
push userunknown
push dateunknown
bugs433790
Bug 433790 - Win16 support should be deleted from NSPR; (Jv2a) prlink.c: a s/_WIN32/XP_OS2/ rewrite; r=(wtc + mozilla%Weilbacher.org)
pr/src/linking/prlink.c
--- a/pr/src/linking/prlink.c
+++ b/pr/src/linking/prlink.c
@@ -183,28 +183,22 @@ void _PR_InitLinker(void)
     if (!pr_linker_lock) {
         pr_linker_lock = PR_NewNamedMonitor("linker-lock");
     }
     PR_EnterMonitor(pr_linker_lock);
 
 #if defined(XP_PC)
     lm = PR_NEWZAP(PRLibrary);
     lm->name = strdup("Executable");
-        /* 
-        ** In WIN32, GetProcAddress(...) expects a module handle in order to
-        ** get exported symbols from the executable...
-        **
-        ** However, in WIN16 this is accomplished by passing NULL to 
-        ** GetProcAddress(...)
-        */
-#if defined(_WIN32)
-        lm->dlh = GetModuleHandle(NULL);
+#if defined(XP_OS2)
+    lm->dlh = NULLHANDLE;
 #else
-        lm->dlh = (HINSTANCE)NULL;
-#endif /* ! _WIN32 */
+    /* A module handle for the executable. */
+    lm->dlh = GetModuleHandle(NULL);
+#endif /* ! XP_OS2 */
 
     lm->refCount    = 1;
     lm->staticTable = NULL;
     pr_exe_loadmap  = lm;
     pr_loadmap      = lm;
 
 #elif defined(XP_UNIX)
 #ifdef HAVE_DLL