Changeset 4818 for trunk/src/odincrt


Ignore:
Timestamp:
Dec 17, 2000, 12:33:37 AM (25 years ago)
Author:
bird
Message:

Watcom preparations.

Location:
trunk/src/odincrt
Files:
2 edited

Legend:

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

    r2649 r4818  
    1 /* $Id: initterm.cpp,v 1.3 2000-02-05 02:05:37 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.4 2000-12-16 23:33:37 bird Exp $ */
    22
    33/*
     
    3535#include <exitlist.h>
    3636
     37#ifdef __IBMCPP__
    3738extern "C" {
    3839/*-------------------------------------------------------------------*/
     
    7172                                   ulFlag)
    7273{
    73    size_t i;
    7474   APIRET rc;
    7575
     
    134134   return ;
    135135}
     136
     137#elif defined(__WATCOM_CPLUSPLUS__)
     138
     139/*
     140 * Watcom dll init and term routines.
     141 */
     142
     143int __dll_initialize(unsigned long hModule, unsigned long ulFlag)
     144{
     145    APIRET rc;
     146    #if 1 /*
     147          * Experimental console hack. Sets apptype to PM anyhow.
     148          * First Dll to be initiated should now allways be OdinCrt!
     149          * So include odincrt first!
     150          */
     151    PPIB pPIB;
     152    PTIB pTIB;
     153    rc = DosGetInfoBlocks(&pTIB, &pPIB);
     154    if (rc != NO_ERROR)
     155        return 0UL;
     156    pPIB->pib_ultype = 3;
     157    #endif
     158    return 1;
     159}
     160
     161int __dll_terminate(unsigned long hModule, unsigned long ulFlag)
     162{
     163    return 1;
     164}
     165
     166#else
     167#error message("compiler is not supported");
     168#endif
     169
  • trunk/src/odincrt/makefile

    r4717 r4818  
    1 # $Id: makefile,v 1.20 2000-12-02 23:40:36 bird Exp $
     1# $Id: makefile,v 1.21 2000-12-16 23:33:37 bird Exp $
    22
    33#
     
    3939DEFFILE = odin36$(DBG).def
    4040!endif
     41!ifdef WAT
     42DEFFILE = odinwat$(DBG).def
     43!endif
    4144!ifndef DEFFILE
    4245!error "not supported on this compiler yet."
     
    5053$(OBJDIR)\odincrt.obj \
    5154$(OBJDIR)\initterm.obj \
     55!ifndef WAT
    5256$(OBJDIR)\malloc.obj \
    5357$(OBJDIR)\string.obj \
    5458$(OBJDIR)\file.obj
     59!else
     60$(%WATCOM)\lib386\os2\$(RTLLIB_O)
     61!endif
    5562
    5663
     
    5865# Libraries. One space before the '\'.
    5966#
    60 LIBS =
     67LIBS = \
     68!ifdef WAT
     69$(RTLLIB_O)
     70!endif
    6171
    6272
Note: See TracChangeset for help on using the changeset viewer.