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