source: trunk/include/odin.h@ 5288

Last change on this file since 5288 was 5288, checked in by mike, 24 years ago

Changes/fixes/updates for building with Watcom

File size: 2.0 KB
Line 
1/*
2 * ODIN - Build Environment Definition
3 *
4 * Copyright (C) 1999 Patrick Haller <phaller@gmx.net>
5 *
6 * ------------------------------------------------------------
7 * Note: Only compiler linkage definitions and similar stuff
8 * goes here. Nothing else.
9 * ------------------------------------------------------------
10 *
11 */
12
13
14#ifndef _ODIN_H_
15#define _ODIN_H_
16
17
18/***********************************
19 * Compiler Environment Definition *
20 ***********************************/
21
22#ifdef CDECL
23# undef CDECL
24#endif
25
26#ifdef EXPORT
27# undef EXPORT
28#endif
29
30#ifdef WIN32API
31# undef WIN32API
32#endif
33
34#ifdef SYSTEM
35# undef SYSTEM
36#endif
37
38#ifdef PASCAL
39# undef PASCAL
40#endif
41
42#ifdef UNALIGNED
43# undef UNALIGNED
44#endif
45
46
47/* ---------- WATCOM C ---------- */
48#ifdef __WATCOMC__
49 #define CDECL _cdecl
50 #define EXPORT _export
51 #define WIN32API __stdcall
52 #define WINAPI __stdcall
53 #define SYSTEM _System
54 #define PASCAL __stdcall
55 #define UNALIGNED
56
57//MN: For some strange reason Watcom doesn't define these for C++!
58// This is not the best place to define them though.
59#ifdef __cplusplus
60 #define min(a,b) (((a) < (b)) ? (a) : (b))
61 #define max(a,b) (((a) > (b)) ? (a) : (b))
62#endif
63
64#else
65
66/* ---------- GCC/EMX ---------- */
67#ifdef __GNUC__
68 #define CDECL _cdecl
69 #define EXPORT _export
70 #define WIN32API __stdcall
71 #define WINAPI __stdcall
72 #define SYSTEM __stdcall
73 #define PASCAL __stdcall
74 #define UNALIGNED
75#else
76
77/* ---------- VAC ---------- */
78#if (defined(__IBMCPP__) || defined(__IBMC__))
79 #define CDECL __cdecl
80 #define EXPORT _Export
81 #define WIN32API __stdcall
82 #define WINAPI __stdcall
83 #define SYSTEM _System
84 #define PASCAL __stdcall
85 #define UNALIGNED
86 #define __inline__ inline
87
88#ifndef RC_INVOKED
89 #if (__IBMCPP__ == 300) || (__IBMC__ == 300)
90 #define NONAMELESSUNION
91 #endif
92#endif
93
94#ifndef RC_INVOKED
95 #include <builtin.h>
96#endif
97
98#else
99
100#ifndef RC_INVOKED
101/* ---------- ??? ---------- */
102#error No known compiler.
103#endif
104#endif
105#endif
106#endif
107
108
109
110#endif /* _ODIN_H_*/
111
Note: See TracBrowser for help on using the repository browser.