]> git.saurik.com Git - wxWidgets.git/blob - src/iodbc/windows.h
Fixed nasty bug wxFont
[wxWidgets.git] / src / iodbc / windows.h
1 #ifndef DEBUG
2
3 #endif
4 #ifndef APWIN /* don't reinclude */
5 #define APWIN
6 #ifndef DEBUG
7
8 #endif
9
10 #ifdef WININC
11 # include <windows.h> /* normal windows.h */
12 # ifdef WIN32
13 # include <windowsx.h> /* windows extensions */
14 # define GetCurrentTask (HTASK)GetCurrentProcess
15 # define GetDOSEnvironment GetEnvironmentStrings
16 # define PCALL
17 # else
18 # define PCALL PASCAL
19 # endif
20 #else /* not windows */
21 /******* Common definitions and typedefs **********************/
22 #ifdef HPUX
23 # ifndef _VOID
24 # define VOID int
25 # endif
26 # ifndef _UCHAR
27 typedef char UCHAR;
28 # define _UCHAR
29 # endif
30 # ifndef _SCHAR
31 typedef char SCHAR;
32 # define _SCHAR
33 # endif
34 #endif /* HPUX */
35
36 #ifdef OSF1
37 # ifndef _UCHAR
38 typedef char UCHAR;
39 # define _UCHAR
40 # endif
41 # ifndef _SDWORD
42 # define _SDWORD
43 typedef int SDWORD;
44 # endif
45 # ifndef _UDWORD
46 # define _UDWORD
47 typedef unsigned int UDWORD;
48 # endif
49 # ifndef _LDOUBLE
50 # define _LDOUBLE
51 typedef double LDOUBLE;
52 # endif
53 # ifndef _DWORD
54 # define _DWORD
55 typedef int DWORD;
56 # endif
57 #endif /* OSF1 */
58
59 #if defined (SVR4) && defined(I386)
60 # ifndef _UCHAR
61 typedef char UCHAR;
62 # define _UCHAR
63 # endif
64 # ifndef _LDOUBLE
65 # define _LDOUBLE
66 typedef double LDOUBLE;
67 # endif
68 #endif /* SVR4 && I386 */
69
70 #ifndef _VOID
71 # define _VOID
72 # define VOID void
73 #endif
74
75 #ifdef WIN
76 # define LONG long
77 #endif
78
79 #ifndef _DWORD
80 # define _DWORD
81 /* typedef unsigned long DWORD; */
82 #endif
83
84 #ifndef _UINT
85 # define _UINT
86 typedef unsigned int UINT;
87 #endif
88
89 #ifdef PC
90 # define FAR _far
91 # define NEAR _near
92 # define PASCAL _pascal
93 # define CDECL _cdecl
94 # define WINAPI _far _pascal
95 # define CALLBACK _far _pascal
96 # define EXPORT _export
97 #else
98 # define FAR
99 # define NEAR
100 # define PASCAL
101 # define CDECL
102 # define WINAPI
103 # define CALLBACK
104 # define EXPORT
105 #endif
106 #define PCALL PASCAL
107
108 /****** Simple types & common helper macros ********************/
109
110 /* typedef int BOOL; */
111 #define FALSE 0
112 #define TRUE 1
113
114 typedef unsigned char BYTE;
115 /* typedef unsigned short WORD; */
116
117 #define LOBYTE(w) ((BYTE)(w))
118 #define HIBYTE(w) ((BYTE)(((UINT)(w) >> 8) & 0xFF))
119
120 #define LOWORD(l) ((WORD)(DWORD)(l))
121 #define HIWORD(l) ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF))
122
123 #define MAKELONG(low, high) ((LONG)(((WORD)(low)) |\
124 (((DWORD)((WORD)(high))) << 16)))
125
126 #define max(a,b) (((a) > (b)) ? (a) : (b))
127 #define min(a,b) (((a) < (b)) ? (a) : (b))
128
129 /****** Common pointer types **********************************/
130
131 #ifndef NULL
132 #define NULL 0
133 #endif
134
135 /****** Common handle types *************************************/
136
137 typedef UINT HANDLE;
138 /* typedef UINT HWND; */
139
140
141 #endif /* ifdef not WIN */
142
143 #endif /* ifdef APWIN */
144
145 /* end of apwin.h */