source: trunk/include/misc.h@ 14

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

Refined compiler definition support.

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