Changeset 510 for trunk/src


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
Files:
46 edited

Legend:

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

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:38 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:01 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/NTDLL/makefile

    r450 r510  
    1 # $Id: makefile,v 1.6 1999-08-09 18:44:05 achimha Exp $
     1# $Id: makefile,v 1.7 1999-08-16 16:28:01 sandervl Exp $
    22
    33#
     
    4040
    4141$(TARGET).dll: $(OBJS) $(TARGET).def
    42         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     42        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    4343# PMWINX.LIB LIBULS.LIB LIBCONV.LIB
    4444        $(CP) $@ $(PDWIN32_BIN)
  • trunk/src/advapi32/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:38 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:01 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/advapi32/makefile

    r490 r510  
    1 # $Id: makefile,v 1.8 1999-08-13 00:15:16 phaller Exp $
     1# $Id: makefile,v 1.9 1999-08-16 16:28:01 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              $(PDWIN32_LIB)/kernel32.lib \
    31               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     31              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    3232        $(CP) $@ $(PDWIN32_BIN)
    3333
  • trunk/src/capi2032/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:38 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:01 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/capi2032/makefile

    r450 r510  
    1 # $Id: makefile,v 1.4 1999-08-09 18:31:30 achimha Exp $
     1# $Id: makefile,v 1.5 1999-08-16 16:28:01 sandervl Exp $
    22
    33#
     
    2828
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    30         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     30        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3131              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    32               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     32              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
  • trunk/src/comctl32/initterm.cpp

    r131 r510  
    1 /* $Id: initterm.cpp,v 1.4 1999-06-20 14:02:12 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.5 1999-08-16 16:28:02 sandervl Exp $ */
    22/*
    3  * COMDLG32 DLL entry point
     3 * COMCTL32 DLL entry point
    44 *
    55 * Copyright 1998 Sander van Leeuwen
     
    3333#include <misc.h>       /*PLF Wed  98-03-18 23:18:29*/
    3434
    35 extern "C" {
    36 /*-------------------------------------------------------------------*/
    37 /* _CRT_init is the C run-time environment initialization function.  */
    38 /* It will return 0 to indicate success and -1 to indicate failure.  */
    39 /*-------------------------------------------------------------------*/
    40 int CDECL CRT_init(void);
    41 /*-------------------------------------------------------------------*/
    42 /* _CRT_term is the C run-time environment termination function.     */
    43 /* It only needs to be called when the C run-time functions are      */
    44 /* statically linked.                                                */
    45 /*-------------------------------------------------------------------*/
    46 void CDECL CRT_term(void);
    47 void CDECL _ctordtorInit( void );
    48 void CDECL _ctordtorTerm( void );
    49 }
    50 
    5135void CDECL RegisterCOMCTL32WindowClasses(unsigned long hinstDLL);
    5236void CDECL UnregisterCOMCTL32WindowClasses(void);
    53 
    54 /*-------------------------------------------------------------------*/
    55 /* A clean up routine registered with DosExitList must be used if    */
    56 /* runtime calls are required and the runtime is dynamically linked. */
    57 /* This will guarantee that this clean up routine is run before the  */
    58 /* library DLL is terminated.                                        */
    59 /*-------------------------------------------------------------------*/
    60 static void APIENTRY cleanup(ULONG reason);
    61 
    6237
    6338/****************************************************************************/
     
    9065         /*******************************************************************/
    9166
    92          if (CRT_init() == -1)
    93             return 0UL;
    94          _ctordtorInit();
    95 
    9667         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    97 
    98          /*******************************************************************/
    99          /* A DosExitList routine must be used to clean up if runtime calls */
    100          /* are required and the runtime is dynamically linked.             */
    101          /*******************************************************************/
    102 
    103          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    104          if(rc)
    105                 return 0UL;
    10668
    10769         /* register Win32 window classes implemented in this DLL */
     
    11072         break;
    11173      case 1 :
     74         /* unregister Win32 window classes */
     75         UnregisterCOMCTL32WindowClasses();
    11276         break;
    11377      default  :
     
    12185}
    12286
    123 
    124 static void APIENTRY cleanup(ULONG ulReason)
    125 {
    126    /* unregister Win32 window classes */
    127    UnregisterCOMCTL32WindowClasses();
    128 
    129    _ctordtorTerm();
    130    CRT_term();
    131    DosExitList(EXLST_EXIT, cleanup);
    132    return ;
    133 }
  • trunk/src/comctl32/makefile

    r498 r510  
    1 # $Id: makefile,v 1.12 1999-08-14 17:10:51 achimha Exp $
     1# $Id: makefile,v 1.13 1999-08-16 16:28:02 sandervl Exp $
    22#
    33# PD-Win32 API
     
    3333
    3434$(TARGET).dll: $(OBJS) $(TARGET).def rsrc.res
    35         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     35        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3636              $(PDWIN32_LIB)/kernel32.lib \
    3737              $(PDWIN32_LIB)/gdi32.lib \
    3838              $(PDWIN32_LIB)/user32.lib  $(PDWIN32_LIB)/odincrt.lib \
    39               OS2386.LIB
     39              OS2386.LIB cppom30O.lib
    4040              rc rsrc.res comctl32.dll
    4141        $(CP) $@ $(PDWIN32_BIN)
  • trunk/src/comdlg32/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:39 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:02 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/comdlg32/makefile

    r450 r510  
    1 # $Id: makefile,v 1.5 1999-08-09 18:34:38 achimha Exp $
     1# $Id: makefile,v 1.6 1999-08-16 16:28:02 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    3131              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    32               OS2386.LIB
     32              OS2386.LIB cppom30O.lib
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
  • trunk/src/ddraw/initterm.cpp

    r354 r510  
     1/* $Id: initterm.cpp,v 1.6 1999-08-16 16:28:02 sandervl Exp $ */
    12
    23/*
    3 
    4  * This file was created for Sander van Leeuwen
    5 
    6  * by Project Smarts on 8 May 1997.
    7 
     4 * DLL entry point
     5 *
     6 * Copyright 1998 Sander van Leeuwen
     7 * Copyright 1998 Peter Fitzsimmons
     8 *
     9 *
     10 * Project Odin Software License can be found in LICENSE.TXT
     11 *
    812 */
    913
     
    2327#define  INCL_DOSMODULEMGR
    2428#define  INCL_DOSPROCESS
    25 #include <os2wrap.h>
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    2630#include <stdlib.h>
    2731#include <stdio.h>
    2832#include <string.h>
    2933#include <odin.h>
    30 #include <misc.h>       /*PLF Wed  98-03-18 23:18:29*/
    31 
    32 extern "C" {
    33 /*-------------------------------------------------------------------*/
    34 /* _CRT_init is the C run-time environment initialization function.  */
    35 /* It will return 0 to indicate success and -1 to indicate failure.  */
    36 /*-------------------------------------------------------------------*/
    37 int CDECL CRT_init(void);
    38 /*-------------------------------------------------------------------*/
    39 /* _CRT_term is the C run-time environment termination function.     */
    40 /* It only needs to be called when the C run-time functions are      */
    41 /* statically linked.                                                */
    42 /*-------------------------------------------------------------------*/
    43 void CDECL CRT_term(void);
    44 void CDECL _ctordtorInit( void );
    45 void CDECL _ctordtorTerm( void );
    46 }
    47 /*-------------------------------------------------------------------*/
    48 /* A clean up routine registered with DosExitList must be used if    */
    49 /* runtime calls are required and the runtime is dynamically linked. */
    50 /* This will guarantee that this clean up routine is run before the  */
    51 /* library DLL is terminated.                                        */
    52 /*-------------------------------------------------------------------*/
    53 static void APIENTRY cleanup(ULONG reason);
    54 
    55 
     34#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    5635
    5736/****************************************************************************/
     
    6342/* calling this function.                                                   */
    6443/****************************************************************************/
    65 unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
    66                                     ulFlag)
     44unsigned long SYSTEM _DLL_InitTerm(unsigned long hModule, unsigned long
     45                                   ulFlag)
    6746{
    6847   size_t i;
     
    7756   switch (ulFlag) {
    7857      case 0 :
    79 
    80          /*******************************************************************/
    81          /* The C run-time environment initialization function must be      */
    82          /* called before any calls to C run-time functions that are not    */
    83          /* inlined.                                                        */
    84          /*******************************************************************/
    85 
    86          if (CRT_init() == -1)
    87             return 0UL;
    88      _ctordtorInit();
    89 
    90 //SvL: Temporarily disabled
    91 #if 0
    92         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    93 #endif
    94 
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102     return 0UL;
    103 
     58         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm();
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/ddraw/makefile

    r503 r510  
    1313ASFLAGS = -Sc -Sv:ALP
    1414
    15 CFLAGS = $(CFLAGS) /Gn+-I$(PDWIN32_INCLUDE);
    16 CXXFLAGS = $(CXXFLAGS) /Gn+ -I$(PDWIN32_INCLUDE);
     15CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE);
     16CXXFLAGS = $(CXXFLAGS) -I$(PDWIN32_INCLUDE);
    1717
    1818TARGET = ddraw
     
    2222       
    2323
    24 LIBS =  ..\..\lib\pmwinx.lib mmpm2.lib ..\..\lib\comctl32.lib $(PDWIN32_LIB)\advapi32.lib $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)\gdi32.lib $(PDWIN32_LIB)\comctl32.lib $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     24LIBS =  ..\..\lib\pmwinx.lib mmpm2.lib ..\..\lib\comctl32.lib $(PDWIN32_LIB)\advapi32.lib $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)\gdi32.lib $(PDWIN32_LIB)\comctl32.lib $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    2525
    2626all: $(TARGET).dll $(TARGET).lib
     
    2828
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    30         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def $(LIBS)
     30        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def $(LIBS)
    3131  $(CP) $@ $(PDWIN32_BIN)
    3232
  • trunk/src/dsound/initterm.cpp

    r97 r510  
    1 /* $Id: initterm.cpp,v 1.2 1999-06-10 17:09:30 phaller Exp $ */
     1/* $Id: initterm.cpp,v 1.3 1999-08-16 16:28:02 sandervl Exp $ */
    22
    33/*
     
    2727#define  INCL_DOSMODULEMGR
    2828#define  INCL_DOSPROCESS
    29 #include <os2.h>
     29#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3030#include <stdlib.h>
    3131#include <stdio.h>
     
    3333#include <odin.h>
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    35 
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    6035
    6136/****************************************************************************/
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/dsound/makefile

    r450 r510  
    1 # $Id: makefile,v 1.4 1999-08-09 18:38:55 achimha Exp $
     1# $Id: makefile,v 1.5 1999-08-16 16:28:02 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              pmwinx.lib  $(PDWIN32_LIB)/kernel32.lib \
    31               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     31              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    3232        $(CP) $@ $(PDWIN32_BIN)
    3333
     
    4141dsound.obj: dsound.cpp \
    4242    $(PDWIN32_INCLUDE)/misc.h \
    43     os2dsound.h \
    44     no.h
     43    os2dsound.h
    4544
    4645os2dsound.obj: os2dsound.cpp \
    4746    $(PDWIN32_INCLUDE)/misc.h \
    4847    os2sndbuffer.h \
    49     os2dsound.h \
    50     no.h
     48    os2dsound.h
    5149
    5250os2sndbuffer.obj: os2sndbuffer.cpp \
    5351    $(PDWIN32_INCLUDE)/misc.h \
    5452    os2sndbuffer.h \
    55     os2dsound.h \
    56     no.h
     53    os2dsound.h
    5754
    5855misc.obj: misc.c \
  • trunk/src/gdi32/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:39 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:02 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/gdi32/makefile

    r450 r510  
    1 # $Id: makefile,v 1.4 1999-08-09 18:39:53 achimha Exp $
     1# $Id: makefile,v 1.5 1999-08-16 16:28:02 sandervl Exp $
    22
    33#
     
    2828
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    30         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     30        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3131              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    32               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     32              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
  • trunk/src/kernel32/initterm.cpp

    r142 r510  
    1 /* $Id: initterm.cpp,v 1.7 1999-06-21 08:21:55 phaller Exp $ */
     1/* $Id: initterm.cpp,v 1.8 1999-08-16 16:28:02 sandervl Exp $ */
    22
    33/*
     
    3535#include <wprocess.h>
    3636#include "handlemanager.h"
    37 
    38 extern "C" {
    39 /*-------------------------------------------------------------------*/
    40 /* _CRT_init is the C run-time environment initialization function.  */
    41 /* It will return 0 to indicate success and -1 to indicate failure.  */
    42 /*-------------------------------------------------------------------*/
    43 int CDECL CRT_init(void);
    44 /*-------------------------------------------------------------------*/
    45 /* _CRT_term is the C run-time environment termination function.     */
    46 /* It only needs to be called when the C run-time functions are      */
    47 /* statically linked.                                                */
    48 /*-------------------------------------------------------------------*/
    49 void CDECL CRT_term(void);
    50 void CDECL _ctordtorInit( void );
    51 void CDECL _ctordtorTerm( void );
    52 }
    5337
    5438/*-------------------------------------------------------------------*/
     
    9781    {
    9882        case 0 :
    99 
    100             /*******************************************************************/
    101             /* The C run-time environment initialization function must be      */
    102             /* called before any calls to C run-time functions that are not    */
    103             /* inlined.                                                        */
    104             /*******************************************************************/
    105 
    106             if (CRT_init() == -1)
    107                 return 0UL;
    108             _ctordtorInit();
    109 
    11083            dprintf(("kernel32 init\n"));
    11184            CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
     
    11588            /*******************************************************************/
    11689
    117             rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
     90            rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    11891            if (rc)
    11992                return 0UL;
     
    147120{
    148121    dprintf(("kernel32 exit %d\n", ulReason));
    149     _dump_allocated(10);    /*PLF Wed  98-03-18 23:55:07*/
    150122    DestroyTIB();
    151     _ctordtorTerm();
    152     CRT_term();
    153123    DosExitList(EXLST_EXIT, cleanup);
    154124    return ;
  • trunk/src/kernel32/makefile

    r486 r510  
    1 # $Id: makefile,v 1.17 1999-08-12 14:20:29 sandervl Exp $
     1# $Id: makefile,v 1.18 1999-08-16 16:28:02 sandervl Exp $
    22
    33#
     
    8585
    8686$(TARGET).dll: $(OBJS) $(TARGET).def
    87         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def $(PDWIN32_LIB)\PMWINX.LIB $(PDWIN32_LIB)\LIBULS.LIB $(PDWIN32_LIB)\LIBCONV.LIB $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     87        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def $(PDWIN32_LIB)\PMWINX.LIB $(PDWIN32_LIB)\LIBULS.LIB $(PDWIN32_LIB)\LIBCONV.LIB $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    8888        rc -r console.rc console.res
    8989        rc console.res $@
  • trunk/src/lz32/initterm.cpp

    r468 r510  
    1 /* $Id: initterm.cpp,v 1.1 1999-08-10 12:37:33 phaller Exp $ */
     1/* $Id: initterm.cpp,v 1.2 1999-08-16 16:28:03 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/lz32/makefile

    r468 r510  
    1 # $Id: makefile,v 1.1 1999-08-10 12:37:33 phaller Exp $
     1# $Id: makefile,v 1.2 1999-08-16 16:28:03 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) \
    3030        $(PDWIN32_LIB)\odincrt.lib \
    3131        $(PDWIN32_LIB)\kernel32.lib \
    32         os2386.lib \
     32        os2386.lib  cppom30O.lib \
    3333        $(TARGET).def
    3434        $(CP) $@ $(PDWIN32_BIN)
  • trunk/src/mpr/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:44 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:03 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/mpr/makefile

    r450 r510  
    1 # $Id: makefile,v 1.4 1999-08-09 18:43:04 achimha Exp $
     1# $Id: makefile,v 1.5 1999-08-16 16:28:03 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    3131              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    32               OS2386.LIB
     32              OS2386.LIB cppom30O.lib
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
  • trunk/src/odincrt/makefile

    r466 r510  
    1 # $Id: makefile,v 1.4 1999-08-10 11:29:43 phaller Exp $
     1# $Id: makefile,v 1.5 1999-08-16 16:28:03 sandervl Exp $
    22
    33#
     
    1414!include $(PDWIN32_INCLUDE)/pdwin32.mk
    1515
    16 
    17 CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE) /B"/NOIgnoreCase"
    18 CXXFLAGS = $(CXXFLAGS) -I$(PDWIN32_INCLUDE) /B"/NOIgnoreCase"
     16CXXFLAGS = $(CXXFLAGS_ODINCRT) -I$(PDWIN32_INCLUDE)
    1917IMPLIBFLAGS = $(IMPLIBFLAGS) /NOIgnoreCase
    2018
     
    2523all: $(TARGET).dll $(TARGET).lib
    2624
    27 
    2825$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) CPPOM30.LIB CPPOM30O.LIB \
    30         $(PDWIN32_LIB)\LIBULS.LIB $(PDWIN32_LIB)\LIBCONV.LIB \
    31         OS2386.LIB SOMTK.LIB $(TARGET).def
     26        $(LD) $(LDFLAGS_ODINCRT) -Fm -Fe$@ $(OBJS) $(TARGET).def
    3227        $(CP) $@ $(PDWIN32_BIN)
    3328
  • trunk/src/odincrt/odincrt.def

    r483 r510  
    44DATA MULTIPLE NONSHARED READWRITE LOADONCALL
    55CODE LOADONCALL
     6SEGMENTS
     7   DDE4_DATA32 CLASS 'DATA' NONSHARED READWRITE LOADONCALL
     8   LIBDATA16   CLASS 'DATA' NONSHARED READWRITE LOADONCALL
    69
    710; We should have plain forwarders for functions that do
     
    964967    _Exception_CPP                                    @917
    965968    __ctdtused                                        @918
    966 
  • trunk/src/ole32/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:45 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:03 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/ole32/makefile

    r450 r510  
    3333
    3434$(TARGET).dll: $(OBJS) $(TARGET).def
    35         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     35        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3636              $(PDWIN32_LIB)\pmwinx.lib \
    3737              $(PDWIN32_LIB)\advapi32.lib \
    3838              $(PDWIN32_LIB)\kernel32.lib \
    39                $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     39               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    4040        $(CP) $@ $(PDWIN32_BIN)
    4141#              $(PDWIN32_LIB)\ntdll.lib \
  • trunk/src/pe2lx/makefile

    r494 r510  
    1 # $Id: makefile,v 1.7 1999-08-13 18:59:25 sandervl Exp $
     1# $Id: makefile,v 1.8 1999-08-16 16:28:03 sandervl Exp $
    22
    33#
     
    1515
    1616
    17 CFLAGS = $(CFLAGS) -Ge+ /Tm+ /I$(PDWIN32_INCLUDE) /D__PE2LX__
     17CFLAGS = $(CFLAGS) /Ge+ /Tm+ /I$(PDWIN32_INCLUDE) /D__PE2LX__
    1818CXXFLAGS = $(CXXFLAGS) -Ge+ /Tm+ /I$(PDWIN32_INCLUDE) /D__PE2LX__
    1919LDFLAGS = $(LDFLAGS) -Ge+
     
    3232$(TARGET).exe: $(OBJS)
    3333        $(LD) $(LDFLAGS) -Fe$@ $(OBJS) \
    34         $(PDWIN32_LIB)\LIBCONV.LIB cppom30.lib OS2386.LIB
    35 #        $(PDWIN32_LIB)\LIBCONV.LIB $(PDWIN32_LIB)/odincrt.lib OS2386.LIB CPPOM30.LIB
     34#        $(PDWIN32_LIB)\LIBCONV.LIB $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
     35        $(PDWIN32_LIB)\LIBCONV.LIB OS2386.LIB cppom30.lib
    3636        $(CP) $(TARGET).exe $(PDWIN32_BIN)
    3737
  • trunk/src/peldr/makefile

    r506 r510  
    1 # $Id: makefile,v 1.5 1999-08-16 13:54:06 sandervl Exp $
     1# $Id: makefile,v 1.6 1999-08-16 16:28:03 sandervl Exp $
    22
    33#
     
    1515
    1616
    17 CFLAGS = $(CFLAGS) -Ge+ /Gd-  -I$(PDWIN32_INCLUDE)
    18 CXXFLAGS = $(CXXFLAGS) -Ge+ /Gd- -I$(PDWIN32_INCLUDE)
    19 LDFLAGSEXE = $(LDFLAGS) -Ge+ /B"/pmtype:pm /stack:0x30000 /NOBASE /Map" \
    20              $(PDWIN32_LIB)\peldr.lib os2386.lib $(PDWIN32_LIB)\odincrt.lib cppom30.lib
     17CFLAGS = $(CFLAGS) /Ge+ -I$(PDWIN32_INCLUDE)
     18CXXFLAGS = $(CXXFLAGS) /Ge+ -I$(PDWIN32_INCLUDE)
     19LDFLAGSEXE = $(LDFLAGS) /Ge+ /B"/pmtype:pm /stack:0x30000 /NOBASE /Map" \
     20             $(PDWIN32_LIB)\peldr.lib os2386.lib $(PDWIN32_LIB)\odincrt.lib cppom30O.lib
     21
    2122
    2223TARGET = pe
  • trunk/src/shell32/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:46 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:03 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/shell32/makefile

    r451 r510  
    1 # $Id: makefile,v 1.8 1999-08-09 18:54:00 achimha Exp $
     1# $Id: makefile,v 1.9 1999-08-16 16:28:03 sandervl Exp $
    22
    33#
     
    2828
    2929$(TARGET).dll: $(OBJS) $(TARGET).def
    30         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     30        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3131              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    3232              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/advapi32.lib \
    33               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     33              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    3434        $(CP) $@ $(PDWIN32_BIN)
    3535
  • trunk/src/tapi32/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:46 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/tapi32/makefile

    r451 r510  
    1 # $Id: makefile,v 1.4 1999-08-09 18:55:51 achimha Exp $
     1# $Id: makefile,v 1.5 1999-08-16 16:28:04 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    3131              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    32               OS2386.LIB
     32              OS2386.LIB cppom30O.lib
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
  • 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)
  • trunk/src/version/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:47 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/version/makefile

    r488 r510  
    1 # $Id: makefile,v 1.5 1999-08-12 23:33:37 phaller Exp $
     1# $Id: makefile,v 1.6 1999-08-16 16:28:04 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    3131              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    32               $(PDWIN32_LIB)/lz32.lib OS2386.LIB
     32              $(PDWIN32_LIB)/lz32.lib OS2386.LIB cppom30O.lib
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
  • trunk/src/winmm/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:48 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
    22
    33/*
     
    3939extern "C" {
    4040void IRTMidiShutdown();  // IRTMidi shutdown routine
    41 
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_init is the C run-time environment initialization function.  */
    44 /* It will return 0 to indicate success and -1 to indicate failure.  */
    45 /*-------------------------------------------------------------------*/
    46 int CDECL CRT_init(void);
    47 /*-------------------------------------------------------------------*/
    48 /* _CRT_term is the C run-time environment termination function.     */
    49 /* It only needs to be called when the C run-time functions are      */
    50 /* statically linked.                                                */
    51 /*-------------------------------------------------------------------*/
    52 void CDECL CRT_term(void);
    53 void CDECL _ctordtorInit( void );
    54 void CDECL _ctordtorTerm( void );
    5541}
    5642
     
    8874      case 0 :
    8975
    90          /*******************************************************************/
    91          /* The C run-time environment initialization function must be      */
    92          /* called before any calls to C run-time functions that are not    */
    93          /* inlined.                                                        */
    94          /*******************************************************************/
    95 
    96          if (CRT_init() == -1)
    97             return 0UL;
    98          _ctordtorInit();
    99 
    10076         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    10177
     
    10581         /*******************************************************************/
    10682
    107          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
     83         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    10884         if(rc)
    10985                return 0UL;
     
    128104   auxOS2Close();  /* SvL: Close aux device if necessary */
    129105   IRTMidiShutdown;  /* JT: Shutdown RT Midi subsystem, if running. */
    130    _ctordtorTerm();
    131    CRT_term();
    132106   DosExitList(EXLST_EXIT, cleanup);
    133107   return ;
  • trunk/src/winmm/makefile

    r457 r510  
    1 # $Id: makefile,v 1.6 1999-08-09 21:03:16 phaller Exp $
     1# $Id: makefile,v 1.7 1999-08-16 16:28:04 sandervl Exp $
    22
    33#
     
    3131
    3232$(TARGET).dll: $(OBJS) $(TARGET).def
    33         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     33        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3434              $(PDWIN32_LIB)/pmwinx.lib mmpm2.lib  \
    3535              $(PDWIN32_LIB)/kernel32.lib \
    3636              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    3737              OS2386.LIB \
    38               cppom30.lib
    39 # @@@PH CPPOM30.LIB DOES NOT BELONG here, it's a temporary hack!
    40 
     38              cppom30O.lib
    4139        $(CP) $@ $(PDWIN32_BIN)
    4240
  • trunk/src/winspool/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:48 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:04 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/winspool/makefile

    r451 r510  
    1 # $Id: makefile,v 1.4 1999-08-09 18:58:59 achimha Exp $
     1# $Id: makefile,v 1.5 1999-08-16 16:28:05 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    3131              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    32               OS2386.LIB
     32              OS2386.LIB cppom30O.lib
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
  • trunk/src/wnetap32/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:48 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:05 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/wnetap32/makefile

    r453 r510  
    1 # $Id: makefile,v 1.4 1999-08-09 19:20:43 achimha Exp $
     1# $Id: makefile,v 1.5 1999-08-16 16:28:05 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    3131              $(PDWIN32_LIB)/user32.lib $(PDWIN32_LIB)/odincrt.lib \
    32               OS2386.LIB
     32              OS2386.LIB cppom30O.lib
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
  • trunk/src/wsock32/initterm.cpp

    r120 r510  
    1 /* $Id: initterm.cpp,v 1.3 1999-06-19 10:54:48 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 1999-08-16 16:28:05 sandervl Exp $ */
    22
    33/*
     
    3434#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3535
    36 extern "C" {
    37 /*-------------------------------------------------------------------*/
    38 /* _CRT_init is the C run-time environment initialization function.  */
    39 /* It will return 0 to indicate success and -1 to indicate failure.  */
    40 /*-------------------------------------------------------------------*/
    41 int CDECL CRT_init(void);
    42 /*-------------------------------------------------------------------*/
    43 /* _CRT_term is the C run-time environment termination function.     */
    44 /* It only needs to be called when the C run-time functions are      */
    45 /* statically linked.                                                */
    46 /*-------------------------------------------------------------------*/
    47 void CDECL CRT_term(void);
    48 void CDECL _ctordtorInit( void );
    49 void CDECL _ctordtorTerm( void );
    50 }
    51 
    52 /*-------------------------------------------------------------------*/
    53 /* A clean up routine registered with DosExitList must be used if    */
    54 /* runtime calls are required and the runtime is dynamically linked. */
    55 /* This will guarantee that this clean up routine is run before the  */
    56 /* library DLL is terminated.                                        */
    57 /*-------------------------------------------------------------------*/
    58 static void APIENTRY cleanup(ULONG reason);
    59 
    60 
    6136/****************************************************************************/
    6237/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8156   switch (ulFlag) {
    8257      case 0 :
    83 
    84          /*******************************************************************/
    85          /* The C run-time environment initialization function must be      */
    86          /* called before any calls to C run-time functions that are not    */
    87          /* inlined.                                                        */
    88          /*******************************************************************/
    89 
    90          if (CRT_init() == -1)
    91             return 0UL;
    92          _ctordtorInit();
    93 
    9458         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    95          /*******************************************************************/
    96          /* A DosExitList routine must be used to clean up if runtime calls */
    97          /* are required and the runtime is dynamically linked.             */
    98          /*******************************************************************/
    99 
    100          rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
    101          if(rc)
    102                 return 0UL;
    103 
    10459         break;
    10560      case 1 :
     
    11469   return 1UL;
    11570}
    116 
    117 
    118 static void APIENTRY cleanup(ULONG ulReason)
    119 {
    120    _ctordtorTerm(); 
    121    CRT_term();
    122    DosExitList(EXLST_EXIT, cleanup);
    123    return ;
    124 }
  • trunk/src/wsock32/makefile

    r451 r510  
    1 # $Id: makefile,v 1.5 1999-08-09 19:00:24 achimha Exp $
     1# $Id: makefile,v 1.6 1999-08-16 16:28:05 sandervl Exp $
    22
    33#
     
    2727
    2828$(TARGET).dll: $(OBJS) $(TARGET).def
    29         $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def \
     29        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    3030              $(PDWIN32_LIB)\pmwinx.lib $(PDWIN32_LIB)\user32.lib \
    3131              tcp32dll.lib so32dll.lib  $(PDWIN32_LIB)\kernel32.lib \
    32               $(PDWIN32_LIB)/odincrt.lib OS2386.LIB
     32              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB cppom30O.lib
    3333        $(CP) $@ $(PDWIN32_BIN)
    3434
Note: See TracChangeset for help on using the changeset viewer.