Futher changes to casts
[tinycc/daniel.git] / win32 / include / winapi / windows.h
blobde2cf9b8571918177af809ab07564b73acd82dee
1 /*
2 windows.h - main header file for the Win32 API
4 Written by Anders Norlander <anorland@hem2.passagen.se>
6 This file is part of a free library for the Win32 API.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 #ifndef _WINDOWS_H
14 #define _WINDOWS_H
15 #if __GNUC__ >=3
16 #pragma GCC system_header
17 #endif
19 /* translate GCC target defines to MS equivalents. Keep this synchronized
20 with winnt.h. */
21 #if defined(__i686__) && !defined(_M_IX86)
22 #define _M_IX86 600
23 #elif defined(__i586__) && !defined(_M_IX86)
24 #define _M_IX86 500
25 #elif defined(__i486__) && !defined(_M_IX86)
26 #define _M_IX86 400
27 #elif defined(__i386__) && !defined(_M_IX86)
28 #define _M_IX86 300
29 #endif
30 #if defined(_M_IX86) && !defined(_X86_)
31 #define _X86_
32 #elif defined(_M_ALPHA) && !defined(_ALPHA_)
33 #define _ALPHA_
34 #elif defined(_M_PPC) && !defined(_PPC_)
35 #define _PPC_
36 #elif defined(_M_MRX000) && !defined(_MIPS_)
37 #define _MIPS_
38 #elif defined(_M_M68K) && !defined(_68K_)
39 #define _68K_
40 #endif
42 #ifdef RC_INVOKED
43 /* winresrc.h includes the necessary headers */
44 #include <winresrc.h>
45 #else
47 #ifdef __GNUC__
48 #ifndef NONAMELESSUNION
49 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
50 #define _ANONYMOUS_UNION __extension__
51 #define _ANONYMOUS_STRUCT __extension__
52 #else
53 #if defined(__cplusplus)
54 #define _ANONYMOUS_UNION __extension__
55 #endif /* __cplusplus */
56 #endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
57 #endif /* NONAMELESSUNION */
58 #elif defined(__WATCOMC__)
59 #define _ANONYMOUS_UNION
60 #define _ANONYMOUS_STRUCT
61 #endif /* __GNUC__/__WATCOMC__ */
63 #ifndef _ANONYMOUS_UNION
64 #define _ANONYMOUS_UNION
65 #define _UNION_NAME(x) x
66 #define DUMMYUNIONNAME u
67 #define DUMMYUNIONNAME2 u2
68 #define DUMMYUNIONNAME3 u3
69 #define DUMMYUNIONNAME4 u4
70 #define DUMMYUNIONNAME5 u5
71 #define DUMMYUNIONNAME6 u6
72 #define DUMMYUNIONNAME7 u7
73 #define DUMMYUNIONNAME8 u8
74 #else
75 #define _UNION_NAME(x)
76 #define DUMMYUNIONNAME
77 #define DUMMYUNIONNAME2
78 #define DUMMYUNIONNAME3
79 #define DUMMYUNIONNAME4
80 #define DUMMYUNIONNAME5
81 #define DUMMYUNIONNAME6
82 #define DUMMYUNIONNAME7
83 #define DUMMYUNIONNAME8
84 #endif
85 #ifndef _ANONYMOUS_STRUCT
86 #define _ANONYMOUS_STRUCT
87 #define _STRUCT_NAME(x) x
88 #define DUMMYSTRUCTNAME s
89 #define DUMMYSTRUCTNAME2 s2
90 #define DUMMYSTRUCTNAME3 s3
91 #else
92 #define _STRUCT_NAME(x)
93 #define DUMMYSTRUCTNAME
94 #define DUMMYSTRUCTNAME2
95 #define DUMMYSTRUCTNAME3
96 #endif
98 #ifndef NO_STRICT
99 #ifndef STRICT
100 #define STRICT 1
101 #endif
102 #endif
104 #include <stdarg.h>
105 #include <windef.h>
106 #include <wincon.h>
107 #include <basetyps.h>
108 #include <excpt.h>
109 #include <winbase.h>
110 #ifndef _WINGDI_H
111 #include <wingdi.h>
112 #endif
113 #ifndef _WINUSER_H
114 #include <winuser.h>
115 #endif
116 #ifndef _WINNLS_H
117 #include <winnls.h>
118 #endif
119 #ifndef _WINVER_H
120 #include <winver.h>
121 #endif
122 #ifndef _WINNETWK_H
123 #include <winnetwk.h>
124 #endif
125 #ifndef _WINREG_H
126 #include <winreg.h>
127 #endif
128 #ifndef _WINSVC_H
129 #include <winsvc.h>
130 #endif
132 #ifndef WIN32_LEAN_AND_MEAN
133 #include <commdlg.h>
134 #include <cderr.h>
135 #include <dde.h>
136 #include <ddeml.h>
137 #include <dlgs.h>
138 #include <lzexpand.h>
139 #include <mmsystem.h>
140 #include <nb30.h>
141 #include <rpc.h>
142 #include <shellapi.h>
143 #include <winperf.h>
144 #include <winspool.h>
145 #if defined(Win32_Winsock)
146 #warning "The Win32_Winsock macro name is deprecated.\
147 Please use __USE_W32_SOCKETS instead"
148 #ifndef __USE_W32_SOCKETS
149 #define __USE_W32_SOCKETS
150 #endif
151 #endif
152 #if defined(__USE_W32_SOCKETS) || !(defined(__CYGWIN__) || defined(__MSYS__) || defined(_UWIN))
153 #if (_WIN32_WINNT >= 0x0400)
154 #include <winsock2.h>
156 * MS likes to include mswsock.h here as well,
157 * but that can cause undefined symbols if
158 * winsock2.h is included before windows.h
160 #else
161 #include <winsock.h>
162 #endif /* (_WIN32_WINNT >= 0x0400) */
163 #endif
164 #endif /* WIN32_LEAN_AND_MEAN */
166 #endif /* RC_INVOKED */
168 #ifdef __OBJC__
169 /* FIXME: Not undefining BOOL here causes all BOOLs to be WINBOOL (int),
170 but undefining it causes trouble as well if a file is included after
171 windows.h
173 #undef BOOL
174 #endif
176 #endif