NSPR library name change (libnspr21 ==> libnspr3) and
authorwtc%netscape.com
Wed, 17 Mar 1999 21:25:08 +0000
changeset 495 ea776f3d0d2549007ebc65f546eeeba6340e2134
parent 492 e495e4c00fb468c029b48acd87c9d14986fee0ec
child 496 44521a18e26e8b8385d0b7acfd6f10b3a72e911c
child 497 08d85965938335c5ddb0216b658d7238093759e3
child 498 da59caf6746ccb56ec50aa47f6a331133e638b48
child 499 bb614fdbf1c9adc96b017a0fa3bc29f40433494a
push idunknown
push userunknown
push dateunknown
NSPR library name change (libnspr21 ==> libnspr3) and plevent.c.
config/module.df
config/rules.mk
lib/ds/Makefile
lib/ds/plevent.c
lib/libc/src/Makefile
lib/prstreams/Makefile
lib/prstreams/tests/testprstrm/Makefile
lib/tests/Makefile
lib/tests/windows/makefile
pr/tests/Makefile
--- a/config/module.df
+++ b/config/module.df
@@ -15,9 +15,9 @@
 # Reserved.
 #
 
 # Module description file
 #
 # A module is also called a component or a subsystem.
 
 MOD_NAME = nspr20
-MOD_VERSION = 21
+MOD_VERSION = 3
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -63,20 +63,20 @@ endif
 # The names of these libraries can be generated by simply specifying
 # LIBRARY_NAME and LIBRARY_VERSION.
 #
 
 ifdef LIBRARY_NAME
 ifeq ($(OS_ARCH), WINNT)
 
 #
-# Win16 and OS/2 require library names conforming to the 8.3 rule.
+# Win95, Win16, and OS/2 require library names conforming to the 8.3 rule.
 # other platforms do not.
 #
-ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
+ifeq (,$(filter-out WIN95 WIN16 OS2,$(OS_TARGET)))
 LIBRARY		= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
 SHARED_LIBRARY	= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 IMPORT_LIBRARY	= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
 else
 LIBRARY		= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
 SHARED_LIBRARY	= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
 IMPORT_LIBRARY	= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
 endif
--- a/lib/ds/Makefile
+++ b/lib/ds/Makefile
@@ -51,17 +51,21 @@ EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_V
 else
 EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).$(LIB_SUFFIX)
 endif
 else
 DLLBASE=/BASE:0x30000000
 RES=$(OBJDIR)/ds.res
 RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
 OS_LIBS = user32.lib
+ifeq ($(OS_TARGET),WIN95)
+EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
+else
 EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
+endif
 
 ifdef MOZ_DEBUG
 ifdef GLOWCODE
 EXTRA_LIBS += $(GLOWDIR)/glowcode.lib
 endif
 endif
 
 endif
--- a/lib/ds/plevent.c
+++ b/lib/ds/plevent.c
@@ -91,18 +91,16 @@ struct PLEventQueue {
 static PRStatus    _pl_SetupNativeNotifier(PLEventQueue* self);
 static void        _pl_CleanupNativeNotifier(PLEventQueue* self);
 static PRStatus    _pl_NativeNotify(PLEventQueue* self);
 static PRStatus    _pl_AcknowledgeNativeNotify(PLEventQueue* self);
 static void        _md_CreateEventQueue( PLEventQueue *eventQueue );
 
 
 #if defined(_WIN32) || defined(WIN16) || defined(XP_OS2)
-PLEventQueue * _pr_MainEventQueue;
-
 #if defined(XP_OS2)
 ULONG _pr_PostEventMsgId;
 static char *_pr_eventWindowClass = "NSPR:EventWindow";
 #else
 UINT _pr_PostEventMsgId;
 static char *_pr_eventWindowClass = "NSPR:EventWindow";
 #endif /* OS2 */
 #endif /* Win32, Win16, OS2 */
@@ -636,25 +634,18 @@ static void
     close(self->eventPipe[1]);
 #endif
 }
 
 #if defined(_WIN32) || defined(WIN16)
 static PRStatus
 _pl_NativeNotify(PLEventQueue* self)
 {
-    /*
-    ** Post a message to the NSPR window on the main thread requesting 
-    ** it to process the pending events. This is only necessary for the
-    ** main event queue, since the main thread is waiting for OS events.
-    */
-    if (self == _pr_MainEventQueue ) {
-       PostMessage( self->eventReceiverWindow, _pr_PostEventMsgId,
-                      (WPARAM)0, (LPARAM)self);
-    }
+	PostMessage( self->eventReceiverWindow, _pr_PostEventMsgId,
+	    (WPARAM)0, (LPARAM)self);
     return PR_SUCCESS;
 }/* --- end _pl_NativeNotify() --- */
 #endif
 
 #if defined(XP_OS2)
 static PRStatus
 _pl_NativeNotify(PLEventQueue* self)
 {
@@ -789,49 +780,38 @@ BOOL WINAPI DllMain (HINSTANCE hDLL, DWO
   }
 
     return TRUE;
 }
 #endif
 
 
 #if defined(WIN16) || defined(_WIN32) || defined(XP_OS2)
-PR_IMPLEMENT(PLEventQueue *)
-    PL_GetMainEventQueue( void )
-{
-   PR_ASSERT( _pr_MainEventQueue );
-
-   return _pr_MainEventQueue;
-}
 #ifdef XP_OS2
 MRESULT EXPENTRY
 _md_EventReceiverProc(HWND hwnd, ULONG uMsg, MPARAM wParam, MPARAM lParam)
 #else
 LRESULT CALLBACK 
 #if defined(WIN16)
 __loadds
 #endif
 _md_EventReceiverProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 #endif
 {
     if (_pr_PostEventMsgId == uMsg )
     {
-        PREventQueue *queue = (PREventQueue *)lParam;
-
-        PR_ASSERT(queue == PL_GetMainEventQueue());
-        if (queue == PL_GetMainEventQueue()) 
-        {
-            PR_ProcessPendingEvents(queue);
+		PREventQueue *queue = (PREventQueue *)lParam;
+    
+    	PR_ProcessPendingEvents(queue);
 #ifdef XP_OS2
             return MRFROMLONG(TRUE);
 #else
             return TRUE;
 #endif
         }
-    } 
     return DefWindowProc(hwnd, uMsg, wParam, lParam);
 }
 
 
 static PRBool   isInitialized;
 static PRCallOnceType once;
 static PRLock   *initLock;
 
@@ -845,51 +825,20 @@ static PRStatus InitEventLib( void )
     
     initLock = PR_NewLock();
     if ( NULL == initLock )
         return PR_FAILURE;
     else
         return PR_SUCCESS;
 } /* end InitWinEventLib() */
 
-
-PR_IMPLEMENT(void)
-    PL_InitializeEventsLib( char *name )
-{
-    PLEventQueue    *eventQueue;
-
-    PR_CallOnce( &once, InitEventLib );
-
-    PR_Lock( initLock );
-    if ( isInitialized == PR_FALSE )
-    {
-        isInitialized = PR_TRUE;
-
-        eventQueue = PL_CreateEventQueue( name, PR_GetCurrentThread() );
-        _pr_MainEventQueue = eventQueue;
-    }
-    PR_Unlock( initLock );
-
-    PR_LOG(event_lm, PR_LOG_DEBUG,("PL_InitializeeventsLib(). Done!\n"));
-    return;
-}
 #endif /* Win16, Win32, OS2 */
 
 #if defined(_WIN32) || defined(WIN16) || defined(XP_OS2)
 
-PR_IMPLEMENT(HWND)
-    PR_GetEventReceiverWindow( void )
-{
-    HWND    eventReceiver = _pr_MainEventQueue->eventReceiverWindow;
-
-    if( eventReceiver != 0 )
-    	return eventReceiver;
-    else
-        return 0;
-}
 #endif
 
 #if defined(_WIN32) || defined(WIN16)
 /*
 ** _md_CreateEventQueue() -- ModelDependent initializer
 */
 static void _md_CreateEventQueue( PLEventQueue *eventQueue )
 {
--- a/lib/libc/src/Makefile
+++ b/lib/libc/src/Makefile
@@ -58,17 +58,21 @@ ifdef XP_OS2_EMX
 EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)
 else
 EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
 endif
 else
 DLLBASE=/BASE:0x30000000
 RES=$(OBJDIR)/plc.res
 RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
+ifeq ($(OS_TARGET),WIN95)
+EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
+else
 EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
+endif
 
 ifdef MOZ_DEBUG
 ifdef GLOWCODE
 EXTRA_LIBS += $(GLOWDIR)/glowcode.lib
 endif
 endif
 
 endif
--- a/lib/prstreams/Makefile
+++ b/lib/prstreams/Makefile
@@ -54,17 +54,21 @@ OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:
 ifeq ($(OS_ARCH), WINNT)
     ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
         EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
     else
         DLLBASE=/BASE:0x30000000
         RES=$(OBJDIR)/prstrms.res
         RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
         OS_LIBS = user32.lib
-        EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
+        ifeq ($(OS_TARGET), WIN95)
+            EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
+        else
+            EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
+        endif
     endif
 else
     ifeq ($(OS_ARCH), AIX)
       ifeq ($(OS_RELEASE), 4.1)
         ifeq ($(CLASSIC_NSPR),1)
             OS_LIBS += -lC -lc
         else
             OS_LIBS += -lC_r -lc_r
--- a/lib/prstreams/tests/testprstrm/Makefile
+++ b/lib/prstreams/tests/testprstrm/Makefile
@@ -49,19 +49,24 @@ LDOPTS = -L$(DIST)/lib
 LIBPR = -lnspr$(MOD_VERSION)
 LIBPRSTRMS = -lprstrms$(MOD_VERSION)
 
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET), WIN16)
   LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib
   LIBPRSTRMS = $(DIST)/lib/prstrms$(MOD_VERSION).lib
 else
-LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
-LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
-LIBPRSTRMS = $(DIST)/lib/libprstrms$(MOD_VERSION).$(LIB_SUFFIX)
+  LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
+  ifeq ($(OS_TARGET), WIN95)
+    LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).$(LIB_SUFFIX)
+    LIBPRSTRMS = $(DIST)/lib/prstrms$(MOD_VERSION).$(LIB_SUFFIX)
+  else
+    LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
+    LIBPRSTRMS = $(DIST)/lib/libprstrms$(MOD_VERSION).$(LIB_SUFFIX)
+  endif
 endif
 endif
 
 ifneq ($(OS_ARCH), WINNT)
 PWD = $(shell pwd)
 endif
 
 ifeq ($(OS_ARCH), IRIX)
--- a/lib/tests/Makefile
+++ b/lib/tests/Makefile
@@ -54,20 +54,26 @@ LIBPLC = -lplc$(MOD_VERSION)
 LIBPLDS = -lplds$(MOD_VERSION)
 
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET), WIN16)
   LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib
   LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).lib
   LIBPLDS= $(DIST)/lib/plds$(MOD_VERSION).lib
 else
-LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
-LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
-LIBPLC= $(DIST)/lib/libplc$(MOD_VERSION).$(LIB_SUFFIX)
-LIBPLDS= $(DIST)/lib/libplds$(MOD_VERSION).$(LIB_SUFFIX)
+  LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
+  ifeq ($(OS_TARGET), WIN95)
+  LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).$(LIB_SUFFIX)
+  LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).$(LIB_SUFFIX)
+  LIBPLDS= $(DIST)/lib/plds$(MOD_VERSION).$(LIB_SUFFIX)
+  else
+  LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
+  LIBPLC= $(DIST)/lib/libplc$(MOD_VERSION).$(LIB_SUFFIX)
+  LIBPLDS= $(DIST)/lib/libplds$(MOD_VERSION).$(LIB_SUFFIX)
+  endif
 endif
 endif
 
 ifneq ($(OS_ARCH), WINNT)
 PWD = $(shell pwd)
 endif
 
 ifeq ($(OS_ARCH), IRIX)
--- a/lib/tests/windows/makefile
+++ b/lib/tests/windows/makefile
@@ -30,19 +30,19 @@ CSRCS = winevent.c
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET), WIN16)
   LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib
   LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).lib
   LIBPLDS= $(DIST)/lib/plds$(MOD_VERSION).lib
 else
   LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
   ifeq ($(OS_TARGET), WIN95)
-  LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
-  LIBPLC= $(DIST)/lib/libplc$(MOD_VERSION).$(LIB_SUFFIX)
-  LIBPLDS= $(DIST)/lib/libplds$(MOD_VERSION).lib
+  LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).$(LIB_SUFFIX)
+  LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).$(LIB_SUFFIX)
+  LIBPLDS= $(DIST)/lib/plds$(MOD_VERSION).lib
   else
   LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
   LIBPLC= $(DIST)/lib/libplc$(MOD_VERSION).$(LIB_SUFFIX)
   LIBPLDS= $(DIST)/lib/libplds$(MOD_VERSION).lib
   endif
 endif
 endif
 
--- a/pr/tests/Makefile
+++ b/pr/tests/Makefile
@@ -183,18 +183,23 @@ ifdef XP_OS2_VACPP
   LDOPTS =
   LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).lib
   LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).lib
 else
   LDOPTS = -Zlinker /PM:VIO
 endif
 else
   LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
-  LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
-  LIBPLC= $(DIST)/lib/libplc$(MOD_VERSION).$(LIB_SUFFIX)
+  ifeq ($(OS_TARGET), WIN95)
+    LIBPR = $(DIST)/lib/nspr$(MOD_VERSION).$(LIB_SUFFIX)
+    LIBPLC= $(DIST)/lib/plc$(MOD_VERSION).$(LIB_SUFFIX)
+  else
+    LIBPR = $(DIST)/lib/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
+    LIBPLC= $(DIST)/lib/libplc$(MOD_VERSION).$(LIB_SUFFIX)
+  endif
   ifdef PROFILE                                                                              
     LDOPTS += -PROFILE -MAP                                                                  
   endif # profile
 endif
 endif
 endif
 
 ifneq ($(OS_ARCH), WINNT)