Changeset 510 for trunk/src/user32


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)

Location:
trunk/src/user32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/Makefile

    r451 r510  
    1 # $Id: Makefile,v 1.12 1999-08-09 18:55:28 achimha Exp $
     1# $Id: Makefile,v 1.13 1999-08-16 16:28:04 sandervl Exp $
    22
    33#
     
    3232
    3333$(TARGET).dll: $(OBJS) $(TARGET).def
    34         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     34        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3535              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/gdi32.lib \
    3636              $(PDWIN32_LIB)/kernel32.lib $(PDWIN32_LIB)/libuls.lib \
    37               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     37              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    3838        $(CP) $@ $(PDWIN32_BIN)
    3939
  • 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);
  • trunk/src/user32/new/initterm.cpp

    r346 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-07-20 15:51:06 cbratschi Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
    22
    33/*
     
    3737#include "pmwindow.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    */
     
    8771      case 0 :
    8872
    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 
    9973         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    10074         /*******************************************************************/
     
    10377         /*******************************************************************/
    10478
    105          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
     79         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    10680         if(rc)
    10781                return 0UL;
     
    139113{
    140114   CloseSpyQueue();
     115   DosExitList(EXLST_EXIT, cleanupQueue);
    141116}
    142117
     
    145120   dprintf(("user32 exit\n"));
    146121   UnregisterSystemClasses();
    147    _ctordtorTerm();
    148    CRT_term();
    149122   dprintf(("user32 exit done\n"));
    150123   DosExitList(EXLST_EXIT, cleanup);
  • trunk/src/user32/new/makefile

    r478 r510  
    1 # $Id: makefile,v 1.23 1999-08-11 17:14:37 sandervl Exp $
     1# $Id: makefile,v 1.24 1999-08-16 16:28:04 sandervl Exp $
    22
    33#
     
    4040
    4141$(TARGET).dll: $(OBJS) $(TARGET).def $(TARGET).res
    42         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     42        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    4343              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/gdi32.lib $(PDWIN32_LIB)/kernel32.lib $(PDWIN32_LIB)/libuls.lib \
    44               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     44              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    4545        rc $(TARGET).res $(TARGET).dll
    4646        $(CP) $@ $(PDWIN32_BIN)
Note: See TracChangeset for help on using the changeset viewer.