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.
16 #pragma GCC system_header
19 /* translate GCC target defines to MS equivalents. Keep this synchronized
21 #if defined(__i686__) && !defined(_M_IX86)
23 #elif defined(__i586__) && !defined(_M_IX86)
25 #elif defined(__i486__) && !defined(_M_IX86)
27 #elif defined(__i386__) && !defined(_M_IX86)
30 #if defined(_M_IX86) && !defined(_X86_)
32 #elif defined(_M_ALPHA) && !defined(_ALPHA_)
34 #elif defined(_M_PPC) && !defined(_PPC_)
36 #elif defined(_M_MRX000) && !defined(_MIPS_)
38 #elif defined(_M_M68K) && !defined(_68K_)
43 /* winresrc.h includes the necessary headers */
48 #ifndef NONAMELESSUNION
49 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
50 #define _ANONYMOUS_UNION __extension__
51 #define _ANONYMOUS_STRUCT __extension__
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
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
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
92 #define _STRUCT_NAME(x)
93 #define DUMMYSTRUCTNAME
94 #define DUMMYSTRUCTNAME2
95 #define DUMMYSTRUCTNAME3
107 #include <basetyps.h>
123 #include <winnetwk.h>
132 #ifndef WIN32_LEAN_AND_MEAN
138 #include <lzexpand.h>
139 #include <mmsystem.h>
142 #include <shellapi.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
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
162 #endif /* (_WIN32_WINNT >= 0x0400) */
164 #endif /* WIN32_LEAN_AND_MEAN */
166 #endif /* RC_INVOKED */
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