Merge pull request #297 from t-b/upgrade_msys_openssl_101m
[msysgit.git] / include / windows.h
blobce8928b760c302a1c5b62808e5be10e2dfd32236
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 /* translate GCC target defines to MS equivalents. Keep this synchronized
16 with winnt.h. */
17 #if defined(__i686__) && !defined(_M_IX86)
18 #define _M_IX86 600
19 #elif defined(__i586__) && !defined(_M_IX86)
20 #define _M_IX86 500
21 #elif defined(__i486__) && !defined(_M_IX86)
22 #define _M_IX86 400
23 #elif defined(__i386__) && !defined(_M_IX86)
24 #define _M_IX86 300
25 #endif
26 #if defined(_M_IX86) && !defined(_X86_)
27 #define _X86_
28 #elif defined(_M_ALPHA) && !defined(_ALPHA_)
29 #define _ALPHA_
30 #elif defined(_M_PPC) && !defined(_PPC_)
31 #define _PPC_
32 #elif defined(_M_MRX000) && !defined(_MIPS_)
33 #define _MIPS_
34 #elif defined(_M_M68K) && !defined(_68K_)
35 #define _68K_
36 #endif
38 #ifdef RC_INVOKED
39 /* winresrc.h includes the necessary headers */
40 #include <winresrc.h>
41 #else
43 #ifdef __GNUC__
44 #ifndef NONAMELESSUNION
45 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
46 #define _ANONYMOUS_UNION __extension__
47 #define _ANONYMOUS_STRUCT __extension__
48 #else
49 #if defined(__cplusplus)
50 #define _ANONYMOUS_UNION __extension__
51 #endif /* __cplusplus */
52 #endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
53 #endif /* NONAMELESSUNION */
54 #elif defined(__WATCOMC__)
55 #define _ANONYMOUS_UNION
56 #define _ANONYMOUS_STRUCT
57 #endif /* __GNUC__/__WATCOMC__ */
59 #ifndef _ANONYMOUS_UNION
60 #define _ANONYMOUS_UNION
61 #define _UNION_NAME(x) x
62 #define DUMMYUNIONNAME u
63 #define DUMMYUNIONNAME2 u2
64 #define DUMMYUNIONNAME3 u3
65 #define DUMMYUNIONNAME4 u4
66 #define DUMMYUNIONNAME5 u5
67 #define DUMMYUNIONNAME6 u6
68 #define DUMMYUNIONNAME7 u7
69 #define DUMMYUNIONNAME8 u8
70 #else
71 #define _UNION_NAME(x)
72 #define DUMMYUNIONNAME
73 #define DUMMYUNIONNAME2
74 #define DUMMYUNIONNAME3
75 #define DUMMYUNIONNAME4
76 #define DUMMYUNIONNAME5
77 #define DUMMYUNIONNAME6
78 #define DUMMYUNIONNAME7
79 #define DUMMYUNIONNAME8
80 #endif
81 #ifndef _ANONYMOUS_STRUCT
82 #define _ANONYMOUS_STRUCT
83 #define _STRUCT_NAME(x) x
84 #define DUMMYSTRUCTNAME s
85 #define DUMMYSTRUCTNAME2 s2
86 #define DUMMYSTRUCTNAME3 s3
87 #else
88 #define _STRUCT_NAME(x)
89 #define DUMMYSTRUCTNAME
90 #define DUMMYSTRUCTNAME2
91 #define DUMMYSTRUCTNAME3
92 #endif
94 #ifndef NO_STRICT
95 #ifndef STRICT
96 #define STRICT 1
97 #endif
98 #endif
100 #include <stdarg.h>
101 #include <windef.h>
102 #include <wincon.h>
103 #include <basetyps.h>
104 #include <excpt.h>
105 #include <winbase.h>
106 #ifndef _WINGDI_H
107 #include <wingdi.h>
108 #endif
109 #ifndef _WINUSER_H
110 #include <winuser.h>
111 #endif
112 #ifndef _WINNLS_H
113 #include <winnls.h>
114 #endif
115 #ifndef _WINVER_H
116 #include <winver.h>
117 #endif
118 #ifndef _WINNETWK_H
119 #include <winnetwk.h>
120 #endif
121 #ifndef _WINREG_H
122 #include <winreg.h>
123 #endif
124 #ifndef _WINSVC_H
125 #include <winsvc.h>
126 #endif
128 #ifndef WIN32_LEAN_AND_MEAN
129 #include <commdlg.h>
130 #include <cderr.h>
131 #include <dde.h>
132 #include <ddeml.h>
133 #include <dlgs.h>
134 #include <lzexpand.h>
135 #include <mmsystem.h>
136 #include <nb30.h>
137 #include <rpc.h>
138 #include <shellapi.h>
139 #include <winperf.h>
140 #include <winspool.h>
141 #if defined(Win32_Winsock)
142 #warning "The Win32_Winsock macro name is deprecated.\
143 Please use __USE_W32_SOCKETS instead"
144 #ifndef __USE_W32_SOCKETS
145 #define __USE_W32_SOCKETS
146 #endif
147 #endif
148 #if defined(__USE_W32_SOCKETS) || !(defined(__CYGWIN__) || defined(__MSYS__) || defined(_UWIN))
149 #if (_WIN32_WINNT >= 0x0400) && (__W32API_MAJOR_VERSION > 0)
150 #include <winsock2.h>
152 * MS likes to include mswsock.h here as well,
153 * but that can cause undefined symbols if
154 * winsock2.h is included before windows.h
156 #else
157 #include <winsock.h>
158 #endif /* (_WIN32_WINNT >= 0x0400) && (__W32API_MAJOR_VERSION > 0) */
159 #endif
160 #endif /* WIN32_LEAN_AND_MEAN */
162 #endif /* RC_INVOKED */
164 #ifdef __OBJC__
165 /* FIXME: Not undefining BOOL here causes all BOOLs to be WINBOOL (int),
166 but undefining it causes trouble as well if a file is included after
167 windows.h
169 #undef BOOL
170 #endif
172 #endif