Ignore:
Timestamp:
Aug 16, 1999, 6:28:05 PM (26 years ago)
Author:
sandervl
Message:

Makefile changes & initterm.cpp no longer calls c/c++ library init & termination functions (should only be done in odincrt.dll)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/initterm.cpp

    r225 r510  
    1 /* $Id: initterm.cpp,v 1.5 1999-06-27 16:23:23 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.6 1999-08-16 16:28:04 sandervl Exp $ */
    22
    33/*
     
    3737#include <spy.h>
    3838
    39 extern "C" {
    40 /*-------------------------------------------------------------------*/
    41 /* _CRT_init is the C run-time environment initialization function.  */
    42 /* It will return 0 to indicate success and -1 to indicate failure.  */
    43 /*-------------------------------------------------------------------*/
    44 int CDECL CRT_init(void);
    45 /*-------------------------------------------------------------------*/
    46 /* _CRT_term is the C run-time environment termination function.     */
    47 /* It only needs to be called when the C run-time functions are      */
    48 /* statically linked.                                                */
    49 /*-------------------------------------------------------------------*/
    50 void CDECL CRT_term(void);
    51 void CDECL _ctordtorInit( void );
    52 void CDECL _ctordtorTerm( void );
    53 }
    54 
    5539/*-------------------------------------------------------------------*/
    5640/* A clean up routine registered with DosExitList must be used if    */
     
    6145static void APIENTRY cleanup(ULONG reason);
    6246static void APIENTRY cleanupQueue(ULONG ulReason);
    63 
    6447
    6548
     
    8669   switch (ulFlag) {
    8770      case 0 :
    88 
    89          /*******************************************************************/
    90          /* The C run-time environment initialization function must be      */
    91          /* called before any calls to C run-time functions that are not    */
    92          /* inlined.                                                        */
    93          /*******************************************************************/
    94 
    95          if (CRT_init() == -1)
    96             return 0UL;
    97          _ctordtorInit();
    98 
    9971         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    10072         /*******************************************************************/
     
    10375         /*******************************************************************/
    10476
    105          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
     77         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    10678         if(rc)
    10779                return 0UL;
     
    132104{
    133105   CloseSpyQueue();
     106   DosExitList(EXLST_EXIT, cleanupQueue);
     107   return;
    134108}
    135109
     
    138112   dprintf(("user32 exit\n"));
    139113   UnregisterSystemClasses();
    140    _ctordtorTerm();
    141    CRT_term();
    142114   dprintf(("user32 exit done\n"));
    143115   DosExitList(EXLST_EXIT, cleanup);
Note: See TracChangeset for help on using the changeset viewer.