| [17] | 1 | /*
 | 
|---|
 | 2 |  * ODIN - Build Environment Definition
 | 
|---|
 | 3 |  *
 | 
|---|
| [774] | 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 |  *
 | 
|---|
| [17] | 11 |  */
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 | 
 | 
|---|
 | 14 | #ifndef _ODIN_H_
 | 
|---|
 | 15 | #define _ODIN_H_
 | 
|---|
 | 16 | 
 | 
|---|
 | 17 | 
 | 
|---|
| [774] | 18 | /***********************************
 | 
|---|
 | 19 |  * Compiler Environment Definition *
 | 
|---|
 | 20 |  ***********************************/
 | 
|---|
| [17] | 21 | 
 | 
|---|
| [31] | 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 | 
 | 
|---|
| [17] | 47 | /* ---------- WATCOM C ---------- */
 | 
|---|
 | 48 | #ifdef __WATCOMC__
 | 
|---|
 | 49 |   #define CDECL     _cdecl
 | 
|---|
 | 50 |   #define EXPORT    _export
 | 
|---|
 | 51 |   #define WIN32API  __stdcall
 | 
|---|
| [488] | 52 |   #define WINAPI    __stdcall
 | 
|---|
| [5288] | 53 |   #define SYSTEM    _System
 | 
|---|
| [5148] | 54 |   #define PASCAL    __stdcall
 | 
|---|
| [31] | 55 |   #define UNALIGNED
 | 
|---|
| [5288] | 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 | 
 | 
|---|
| [17] | 64 | #else
 | 
|---|
 | 65 | 
 | 
|---|
 | 66 | /* ---------- GCC/EMX ---------- */
 | 
|---|
 | 67 | #ifdef __GNUC__
 | 
|---|
 | 68 |   #define CDECL     _cdecl
 | 
|---|
 | 69 |   #define EXPORT    _export
 | 
|---|
 | 70 |   #define WIN32API  __stdcall
 | 
|---|
| [488] | 71 |   #define WINAPI    __stdcall
 | 
|---|
| [17] | 72 |   #define SYSTEM    __stdcall
 | 
|---|
| [5148] | 73 |   #define PASCAL    __stdcall
 | 
|---|
| [31] | 74 |   #define UNALIGNED
 | 
|---|
| [5518] | 75 |   #define NONAMELESSUNION
 | 
|---|
 | 76 |   #define NONAMELESSSTRUCT
 | 
|---|
| [17] | 77 | #else
 | 
|---|
 | 78 | 
 | 
|---|
 | 79 | /* ---------- VAC ---------- */
 | 
|---|
 | 80 | #if (defined(__IBMCPP__) || defined(__IBMC__))
 | 
|---|
 | 81 |   #define CDECL     __cdecl
 | 
|---|
 | 82 |   #define EXPORT    _Export
 | 
|---|
 | 83 |   #define WIN32API  __stdcall
 | 
|---|
| [488] | 84 |   #define WINAPI    __stdcall
 | 
|---|
| [17] | 85 |   #define SYSTEM    _System
 | 
|---|
| [5148] | 86 |   #define PASCAL    __stdcall
 | 
|---|
| [17] | 87 |   #define UNALIGNED
 | 
|---|
| [1007] | 88 |   #define __inline__ inline
 | 
|---|
 | 89 | 
 | 
|---|
| [2694] | 90 | #ifndef RC_INVOKED
 | 
|---|
| [5925] | 91 |   //Nameless unions or structures are not supported in C mode
 | 
|---|
 | 92 |   //(nameless unions only in CPP mode and nameless unions only in VAC 3.6.5 CPP mode)
 | 
|---|
 | 93 |   #ifdef __IBMC__
 | 
|---|
| [785] | 94 |   #define NONAMELESSUNION
 | 
|---|
| [5925] | 95 |   #define NONAMELESSSTRUCT
 | 
|---|
| [3354] | 96 |   #endif
 | 
|---|
| [5925] | 97 |   #if (__IBMCPP__ == 300)
 | 
|---|
| [5518] | 98 |   #define NONAMELESSSTRUCT
 | 
|---|
 | 99 |   #endif
 | 
|---|
| [2694] | 100 | #endif
 | 
|---|
| [883] | 101 | 
 | 
|---|
| [3354] | 102 | #ifndef RC_INVOKED
 | 
|---|
| [883] | 103 |   #include <builtin.h>
 | 
|---|
| [3354] | 104 | #endif
 | 
|---|
| [883] | 105 | 
 | 
|---|
| [17] | 106 | #else
 | 
|---|
| [5518] | 107 | #ifdef RC_INVOKED
 | 
|---|
 | 108 |   //SvL: wrc chokes on calling conventions....
 | 
|---|
 | 109 |   #define CDECL     
 | 
|---|
 | 110 |   #define EXPORT    
 | 
|---|
 | 111 |   #define WIN32API  
 | 
|---|
 | 112 |   #define WINAPI    
 | 
|---|
 | 113 |   #define CALLBACK    
 | 
|---|
 | 114 |   #define SYSTEM    
 | 
|---|
 | 115 |   #define PASCAL    
 | 
|---|
 | 116 |   #define UNALIGNED
 | 
|---|
 | 117 |   #define __cdecl
 | 
|---|
 | 118 |   #define _System
 | 
|---|
 | 119 |   #define __inline__ 
 | 
|---|
 | 120 | #else
 | 
|---|
| [17] | 121 | /* ---------- ??? ---------- */
 | 
|---|
 | 122 | #error No known compiler.
 | 
|---|
 | 123 | #endif
 | 
|---|
 | 124 | #endif
 | 
|---|
 | 125 | #endif
 | 
|---|
| [2349] | 126 | #endif
 | 
|---|
| [17] | 127 | 
 | 
|---|
 | 128 | 
 | 
|---|
 | 129 | 
 | 
|---|
 | 130 | #endif /* _ODIN_H_*/
 | 
|---|
 | 131 | 
 | 
|---|