#247962 NSPRPUB_PRE_4_2_CLIENT_BRANCH MOZILLA_1_8a5_RELEASE
authormkaply%us.ibm.com
Mon, 22 Nov 2004 20:07:48 +0000
branchNSPRPUB_PRE_4_2_CLIENT_BRANCH
changeset 3217 3edfae65f9608a3a9d020a8da2fb4177f983fa84
parent 3213 371c3597b58f2bd40c17f4c24d470716329bc940
child 3221 efd28f5bea070f2895a2d2d4c84f1ba4507edaec
push idunknown
push userunknown
push dateunknown
bugs247962
#247962 r=pedemonte, sr=wtc, a=mkaply Patch from mkaply - remove DLL_InitTerm from NSPR - PM switch should happen in app, not NSPR
pr/include/md/_os2.h
pr/src/md/os2/os2misc.c
--- a/pr/include/md/_os2.h
+++ b/pr/include/md/_os2.h
@@ -565,17 +565,16 @@ typedef struct _CONTEXTRECORD {
     ULONG     ctx_EFlags;    /*  EFLAGS register. */
     ULONG     ctx_RegEsp;    /*  ESP register. */
     ULONG     ctx_SegSs;     /*  SS register. */
 } CONTEXTRECORD, *PCONTEXTRECORD;
 #pragma pack()
 #endif
 
 extern APIRET (* APIENTRY QueryThreadContext)(TID, ULONG, PCONTEXTRECORD);
-unsigned long _System _DLL_InitTerm( unsigned long mod_handle, unsigned long flag);
 
 /*
 #define _pr_tid            (((PTIB2)_getTIBvalue(offsetof(TIB, tib_ptib2)))->tib2_ultid)
 #define _pr_current_Thread (_system_tls[_pr_tid-1].__pr_current_thread)
 */
 
 /* Some simple mappings of Windows API's to OS/2 API's to make our lives a
  * little bit easier.  Only add one here if it is a DIRECT mapping.  We are
--- a/pr/src/md/os2/os2misc.c
+++ b/pr/src/md/os2/os2misc.c
@@ -559,43 +559,8 @@ PRStatus _MD_MemUnmap(void *addr, PRUint
 }
 
 PRStatus _MD_CloseFileMap(PRFileMap *fmap)
 {
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return PR_FAILURE;
 }
 
-/*
- *  Automatically set apptype switch for interactive and other
- *  tests that create an invisible plevent window.
- */
-unsigned long _System _DLL_InitTerm( unsigned long mod_handle, unsigned long flag)
-{
-   unsigned long rc = 0; /* failure */
-
-   if( !flag)
-   {
-      /* init */
-      if( _CRT_init() == 0)
-      {
-         PPIB pPib;
-         PTIB pTib;
-
-         /* probably superfluous, but can't hurt */
-         __ctordtorInit(0);
-
-         DosGetInfoBlocks( &pTib, &pPib);
-         pPib->pib_ultype = 3; /* PM */
-
-         rc = 1;
-      }
-   }
-   else
-   {
-      __ctordtorTerm(0);
-      _CRT_term();
-      rc = 1;
-   }
-
-   return rc;
-}
-