source: trunk/include/misc.h@ 13

Last change on this file since 13 was 13, checked in by phaller, 26 years ago

Refined compiler definition support.

File size: 1.5 KB
RevLine 
[13]1/* $Id: misc.h,v 1.3 1999-05-31 17:04:19 phaller Exp $ */
[4]2
3#ifndef __MISC_H__
4#define __MISC_H__
5
6#ifdef __cplusplus
7 extern "C" {
8#endif
9
[13]10/*
11 * Compiler Environment Definition
12 */
13
14/* --- WATCOM C --- */
[4]15#ifdef __WATCOMC__
[13]16 #define CDECL _cdecl
17 #define EXPORT _export
18 #define WIN32API __stdcall
19 #define SYSTEM __stdcall
[4]20#else
[13]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.
[4]40#endif
[13]41#endif
42#endif
43
44
45/* map WINE to ODIN */
46#define WINAPI WIN32API
[4]47#include <builtin.h>
48
[13]49
[4]50#ifdef DEBUG
[13]51 #define DebugInt3() _interrupt(3)
[4]52#else
[13]53 #define DebugInt3()
[4]54#endif
55
56
57#ifdef DEBUG
[13]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()
[4]62#else
[13]63 #define dprintf(a)
64 #define eprintf(a)
65 #define dassert(a, b)
66 #define dbgCheckObj(a)
[4]67#endif
68
[13]69int SYSTEM WriteLog(char *tekst, ...);
70int SYSTEM WriteLogError(char *tekst, ...);
[4]71void SYSTEM CheckVersion(ULONG version, char *modname);
72void SYSTEM CheckVersionFromHMOD(ULONG version, HMODULE hModule);
73
74#ifdef __cplusplus
75 }
76#endif
77
[13]78
79#ifndef _OS2WIN_H
80 #include <win32type.h>
81#endif
82
[4]83#include "versionos2.h"
84#include "unicode.h"
85
86#endif
Note: See TracBrowser for help on using the repository browser.