fixes bug 247962 "Remove DLL_INitterm code from NSPR" patch by mkaply@us.ibm.com r=wtc
authordarin%meer.net
Mon, 22 Nov 2004 21:06:12 +0000
changeset 3218 873fa624e4af672a37111fa4237110883c7ab88b
parent 3216 3045368f00acddd1fe657d82342e383de9d84ec2
child 3219 6317fcbff5e2a36fb99e57aa6ef4a929289b0926
push idunknown
push userunknown
push dateunknown
reviewerswtc
bugs247962
fixes bug 247962 "Remove DLL_INitterm code from NSPR" patch by mkaply@us.ibm.com r=wtc
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;
-}
-