Changeset 13 for trunk/include


Ignore:
Timestamp:
May 31, 1999, 7:04:19 PM (26 years ago)
Author:
phaller
Message:

Refined compiler definition support.

Location:
trunk/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/OS2WIN.H

    r10 r13  
    1 /* $Id: OS2WIN.H,v 1.2 1999-05-27 15:17:57 phaller Exp $ */
     1/* $Id: OS2WIN.H,v 1.3 1999-05-31 17:04:18 phaller Exp $ */
    22
    33#ifndef _OS2WIN_H
    44#define _OS2WIN_H
     5
     6#include "misc.h"
    57
    68#include <windef.h>
     
    1315#include <mmsystem.h>
    1416
    15 #include "misc.h"
    1617
    1718#define OPEN32API       _System
  • trunk/include/misc.h

    r10 r13  
    1 /* $Id: misc.h,v 1.2 1999-05-27 15:17:58 phaller Exp $ */
     1/* $Id: misc.h,v 1.3 1999-05-31 17:04:19 phaller Exp $ */
    22
    33#ifndef __MISC_H__
    44#define __MISC_H__
    5 
    6 #ifndef _OS2WIN_H
    7 #include <win32type.h>
    8 #endif
    95
    106#ifdef __cplusplus
     
    128#endif
    139
     10/*
     11 * Compiler Environment Definition
     12 */
     13
     14/* --- WATCOM C --- */
    1415#ifdef __WATCOMC__
    15 #define CDECL _cdecl
    16 #define EXPORT _export
    17 #define WIN32API  __stdcall
     16  #define CDECL     _cdecl
     17  #define EXPORT    _export
     18  #define WIN32API  __stdcall
     19  #define SYSTEM    __stdcall
    1820#else
    19 #ifndef CDECL
    20  #define CDECL __cdecl
     21
     22/* --- GCC/EMX --- */
     23#ifdef __GNUC__
     24  #define CDECL     _cdecl
     25  #define EXPORT    _export
     26  #define WIN32API  __stdcall
     27  #define SYSTEM    __stdcall
     28#else
     29
     30/* --- VAC --- */
     31#ifdef __IBMCPP__
     32  #define CDECL     _Cdecl
     33  #define EXPORT    _Export
     34  #define WIN32API  _System _Export
     35  #define SYSTEM    _System
     36#else
     37
     38/* --- ??? --- */
     39#error No known compiler.
    2140#endif
    22 #define EXPORT _Export
    23 #define WIN32API  __stdcall /*_Export done in *.def file now */
     41#endif
     42#endif
     43
     44
     45/* map WINE to ODIN */
     46#define WINAPI WIN32API
    2447#include <builtin.h>
    2548
     49
    2650#ifdef DEBUG
    27 #define DebugInt3()     _interrupt(3)
     51  #define DebugInt3()   _interrupt(3)
    2852#else
    29 #define DebugInt3()
     53  #define DebugInt3()
    3054#endif
    3155
     56
     57#ifdef DEBUG
     58  #define dprintf(a)      WriteLog a
     59  #define eprintf(a)      WriteLog a ; WriteLogError a
     60  #define dassert(a, b)   if(!(a)) WriteLogError b
     61  #define dbgCheckObj(a)        a->checkObject()
     62#else
     63  #define dprintf(a)
     64  #define eprintf(a)
     65  #define dassert(a, b)
     66  #define dbgCheckObj(a)
    3267#endif
    3368
    34 #define SYSTEM _System
    35 
    36 #ifdef DEBUG
    37 #define dprintf(a)      WriteLog a
    38 #define eprintf(a)      WriteLog a ; WriteLogError a
    39 #define dassert(a, b)   if(!(a)) WriteLogError b
    40 #define dbgCheckObj(a)  a->checkObject()
    41 #else
    42 #define dprintf(a)
    43 #define eprintf(a)
    44 #define dassert(a, b)
    45 #define dbgCheckObj(a)
    46 #endif
    47 
    48 int SYSTEM  WriteLog(char *tekst, ...);
    49 int SYSTEM  WriteLogError(char *tekst, ...);
     69int  SYSTEM WriteLog(char *tekst, ...);
     70int  SYSTEM WriteLogError(char *tekst, ...);
    5071void SYSTEM CheckVersion(ULONG version, char *modname);
    5172void SYSTEM CheckVersionFromHMOD(ULONG version, HMODULE hModule);
     
    5576#endif
    5677
     78
     79#ifndef _OS2WIN_H
     80  #include <win32type.h>
     81#endif
     82
    5783#include "versionos2.h"
    5884#include "unicode.h"
  • trunk/include/win/windef.h

    r4 r13  
    1 /* $Id: windef.h,v 1.1 1999-05-24 20:19:21 ktk Exp $ */
     1/* $Id: windef.h,v 1.2 1999-05-31 17:04:19 phaller Exp $ */
    22
    33/*
     
    7979#endif  /* __i386__ */
    8080
    81 #define CALLBACK    __stdcall
    82 #define WINAPI      __stdcall
    83 #define APIPRIVATE  __stdcall
    84 //SvL: Conflict with OS/2 headers
    85 #ifdef __WIN32OS2__
    86 #define PASCAL      _Pascal
    87 #define UNALIGNED
    88 #else
    89 #define PASCAL      __stdcall
    90 #define pascal      __stdcall
    91 #define _pascal     __stdcall
    92 #endif
    93 #define _stdcall    __stdcall
    94 #define _fastcall   __stdcall
    95 #define __export    __stdcall
    96 #define CDECL       __cdecl
    97 #define _CDECL      __cdecl
    98 #define cdecl       __cdecl
    99 #define _cdecl      __cdecl
    100 #define WINAPIV     __cdecl
    101 #define APIENTRY    WINAPI
    102 
    103 #define __declspec(x)
    104 #define dllimport
    105 #define dllexport
    106 
    107 #define CONST       const
     81
     82/* define needed macros as required */
     83#ifndef CALLBACK
     84  #define CALLBACK    __stdcall
     85#endif
     86
     87#ifndef WINAPI
     88  #define WINAPI      __stdcall
     89#endif
     90
     91#ifndef APIPRIVATE
     92  #define APIPRIVATE  __stdcall
     93#endif
     94
     95#ifndef PASCAL
     96  #define PASCAL      __stdcall
     97#endif
     98
     99#ifndef pascal
     100  #define pascal      __stdcall
     101#endif
     102
     103#ifndef _pascal
     104  #define _pascal     __stdcall
     105#endif
     106
     107#ifndef _stdcall
     108  #define _stdcall    __stdcall
     109#endif
     110
     111#ifndef _fastcall
     112  #define _fastcall   __stdcall
     113#endif
     114
     115#ifndef __export
     116  #define __export    __stdcall
     117#endif
     118
     119#ifndef CDECL
     120  #define CDECL       __cdecl
     121#endif
     122
     123#ifndef _CDECL
     124  #define _CDECL      __cdecl
     125#endif
     126
     127#ifndef cdecl
     128  #define cdecl       __cdecl
     129#endif
     130
     131#ifndef _cdecl
     132  #define _cdecl      __cdecl
     133#endif
     134
     135#ifndef WINAPIV
     136  #define WINAPIV     __cdecl
     137#endif
     138
     139#ifndef APIENTRY
     140  #define APIENTRY    WINAPI
     141#endif
     142
     143#ifndef __declspec
     144  #define __declspec(x)
     145#endif
     146
     147#ifndef dllimport
     148  #define dllimport
     149#endif
     150
     151#ifndef dllexport
     152  #define dllexport
     153#endif
     154
     155#ifndef CONST
     156  #define CONST       const
     157#endif
     158
     159
    108160
    109161/* Standard data types. These are the same for emulator and library. */
Note: See TracChangeset for help on using the changeset viewer.