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