1 |
|
---|
2 | /*
|
---|
3 | * setup.h:
|
---|
4 | * sample master include file which gets included
|
---|
5 | * from all helpers *.c sources.
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef SETUP_HEADER_INCLUDED
|
---|
9 | #define SETUP_HEADER_INCLUDED
|
---|
10 |
|
---|
11 | /*************************************************************
|
---|
12 | * *
|
---|
13 | * Additional stuff for EMX *
|
---|
14 | * *
|
---|
15 | *************************************************************/
|
---|
16 |
|
---|
17 | #ifdef __EMX__
|
---|
18 | // EMX doesn't have all these 16-bit typedefs;
|
---|
19 | // added (99-10-22) [umoeller]
|
---|
20 | #define APIENTRY16 _Far16 _Pascal
|
---|
21 | #define PASCAL16 _Far16 _Pascal
|
---|
22 | #define CDECL16 _Far16 _Cdecl
|
---|
23 |
|
---|
24 | typedef unsigned short APIRET16;
|
---|
25 | typedef unsigned long APIRET32;
|
---|
26 |
|
---|
27 | #define _System
|
---|
28 | #define APIENTRY
|
---|
29 | // with VAC++, this defines _System linkage, which
|
---|
30 | // EMX doesn't have, or does it?!?
|
---|
31 | #endif
|
---|
32 |
|
---|
33 | // the following is a VAC++-specific macro, which doesn't exist
|
---|
34 | // with EMX, so we need to implement this... this was one of
|
---|
35 | // the "undefined symbols" we got (99-10-23) [umoeller]
|
---|
36 | // changed this to prefix underscore, because the STL apparently
|
---|
37 | // redefines this V0.9.3 (2000-05-15) [umoeller]
|
---|
38 | #define _min(a,b) ( ((a) > (b)) ? b : a )
|
---|
39 | #define _max(a,b) ( ((a) > (b)) ? a : b )
|
---|
40 |
|
---|
41 | // Uncomment the following if you have trouble with the
|
---|
42 | // exception handlers in helpers\except.c; WarpIN will
|
---|
43 | // then install _no_ additional exception handlers at all
|
---|
44 | // (include\helpers\except.h reacts to these defines).
|
---|
45 | // I'm not sure if the handlers work well with EMX.
|
---|
46 |
|
---|
47 | #ifdef __EMX__
|
---|
48 | #define __NO_EXCEPTION_HANDLERS__
|
---|
49 | #endif
|
---|
50 |
|
---|
51 | /*************************************************************
|
---|
52 | * *
|
---|
53 | * Additional stuff for VAC++ 3.0 *
|
---|
54 | * *
|
---|
55 | *************************************************************/
|
---|
56 |
|
---|
57 | // all this added V0.9.2 (2000-03-10) [umoeller]
|
---|
58 | #if ( defined ( __IBMCPP__ ) && ( __IBMCPP__ < 400 ) )
|
---|
59 | typedef int bool;
|
---|
60 | #define true 1
|
---|
61 | #define false 0
|
---|
62 | #define _BooleanConst // needed for some VAC headers, which define bool also
|
---|
63 | #endif
|
---|
64 |
|
---|
65 | #ifndef __stdlib_h // <stdlib.h>
|
---|
66 | #include <stdlib.h>
|
---|
67 | #endif
|
---|
68 | #ifndef __string_h // <string.h>
|
---|
69 | #include <string.h>
|
---|
70 | #endif
|
---|
71 |
|
---|
72 | /*************************************************************
|
---|
73 | * *
|
---|
74 | * Debugging *
|
---|
75 | * *
|
---|
76 | *************************************************************/
|
---|
77 |
|
---|
78 | // All the following redone (99-10-23) [umoeller]:
|
---|
79 | // __DEBUG__ is defined as a macro on the compiler
|
---|
80 | // command line by the makefiles if DEBUG was enabled
|
---|
81 | // in \setup.in
|
---|
82 | #ifdef __DEBUG__
|
---|
83 |
|
---|
84 | // with debug code, disable the exception handlers
|
---|
85 | #define __NO_EXCEPTION_HANDLERS__
|
---|
86 |
|
---|
87 | // If the following is commented out, no PMPRINTF will be
|
---|
88 | // used at all. WarpIN uses Dennis Bareis' PMPRINTF
|
---|
89 | // package to do this.
|
---|
90 |
|
---|
91 | // NOTE: We cannot use PmPrintf with EMX,
|
---|
92 | // because pmprintf.lib imports the VAC++ runtimes.
|
---|
93 | // That's the strange errors I was reporting yesterday.
|
---|
94 | #ifndef __EMX__
|
---|
95 | #ifdef OS2_INCLUDED
|
---|
96 | #define _PMPRINTF_
|
---|
97 | #include "helpers/pmprintf.h"
|
---|
98 | #endif
|
---|
99 | #endif
|
---|
100 | #endif
|
---|
101 |
|
---|
102 | #ifndef _PMPRINTF_
|
---|
103 | // not defined: define empty macro so we don't
|
---|
104 | // get compiler errors
|
---|
105 | #define _Pmpf(x)
|
---|
106 | #endif
|
---|
107 |
|
---|
108 | #endif
|
---|
109 |
|
---|