OSDN Git Service

Correct a typographic error; fix MinGW-Bug #39193
[mingw/mingw-org-wsl.git] / w32api / tests / headers.at
1 # headers.at
2 #
3 # Autotest module for checking integrity of MinGW runtime headers.
4 # Each header is first individually compiled, to ensure that it is
5 # both valid and self contained; all are then compiled together, to
6 # verify mutual consistency.
7 #
8 # $Id$
9 #
10 # Written by Keith Marshall <keithmarshall@users.sourceforge.net>
11 # Copyright (C) 2017, MinGW.org Project
12 #
13 #
14 # Permission is hereby granted, free of charge, to any person obtaining a
15 # copy of this software and associated documentation files (the "Software"),
16 # to deal in the Software without restriction, including without limitation
17 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 # and/or sell copies of the Software, and to permit persons to whom the
19 # Software is furnished to do so, subject to the following conditions:
20 #
21 # The above copyright notice and this permission notice (including the next
22 # paragraph) shall be included in all copies or substantial portions of the
23 # Software.
24 #
25 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 # AUTHORS OR THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31 # DEALINGS IN THE SOFTWARE.
32 #
33 #
34 # W32API_AT_PACKAGE_HEADERS
35 # -------------------------
36 # Specify the gamut of package headers to be tested.  This list is updated
37 # dynamically, when running "make check"; there is no need to edit it.
38 #
39 m4_define([W32API_AT_PACKAGE_HEADERS],[dnl
40 accctrl.h dnl
41 aclapi.h dnl
42 aclui.h dnl
43 adsprop.h dnl
44 afxres.h dnl
45 amaudio.h dnl
46 amvideo.h dnl
47 audevcod.h dnl
48 aviriff.h dnl
49 aygshell.h dnl
50 basetsd.h dnl
51 basetyps.h dnl
52 bdatypes.h dnl
53 cderr.h dnl
54 cguid.h dnl
55 cmnquery.h dnl
56 comcat.h dnl
57 commctrl.h dnl
58 commdlg.h dnl
59 control.h dnl
60 cplext.h dnl
61 cpl.h dnl
62 custcntl.h dnl
63 dbt.h dnl
64 dde.h dnl
65 ddeml.h dnl
66 devguid.h dnl
67 dhcpcsdk.h dnl
68 dlgs.h dnl
69 docobj.h dnl
70 dsadmin.h dnl
71 dsclient.h dnl
72 dsgetdc.h dnl
73 dshow.h dnl
74 dsquery.h dnl
75 dsrole.h dnl
76 dvdevcod.h dnl
77 dvdmedia.h dnl
78 edevdefs.h dnl
79 errorrep.h dnl
80 errors.h dnl
81 evcode.h dnl
82 exdisp.h dnl
83 exdispid.h dnl
84 fltdefs.h dnl
85 gdiplus.h dnl
86 httpext.h dnl
87 icm.h dnl
88 idispids.h dnl
89 il21dec.h dnl
90 imagehlp.h dnl
91 imm.h dnl
92 initguid.h dnl
93 intshcut.h dnl
94 ipexport.h dnl
95 iphlpapi.h dnl
96 ipifcons.h dnl
97 ipinfoid.h dnl
98 iprtrmib.h dnl
99 iptypes.h dnl
100 ipxconst.h dnl
101 ipxrtdef.h dnl
102 ipxtfflt.h dnl
103 isguids.h dnl
104 ks.h dnl
105 ksmedia.h dnl
106 largeint.h dnl
107 lmaccess.h dnl
108 lmalert.h dnl
109 lmapibuf.h dnl
110 lmat.h dnl
111 lmaudit.h dnl
112 lmbrowsr.h dnl
113 lmchdev.h dnl
114 lmconfig.h dnl
115 lmcons.h dnl
116 lmerr.h dnl
117 lmerrlog.h dnl
118 lm.h dnl
119 lmmsg.h dnl
120 lmremutl.h dnl
121 lmrepl.h dnl
122 lmserver.h dnl
123 lmshare.h dnl
124 lmsname.h dnl
125 lmstats.h dnl
126 lmsvc.h dnl
127 lmuseflg.h dnl
128 lmuse.h dnl
129 lmwksta.h dnl
130 lzexpand.h dnl
131 mapi.h dnl
132 mciavi.h dnl
133 mcx.h dnl
134 mgm.h dnl
135 mgmtapi.h dnl
136 mlang.h dnl
137 mmreg.h dnl
138 mmsystem.h dnl
139 mpegtype.h dnl
140 mprapi.h dnl
141 mq.h dnl
142 msacm.h dnl
143 mshtml.h dnl
144 mswsock.h dnl
145 nb30.h dnl
146 nddeapi.h dnl
147 nspapi.h dnl
148 ntdef.h dnl
149 ntdll.h dnl
150 ntdsapi.h dnl
151 ntdsbcli.h dnl
152 ntldap.h dnl
153 ntsecapi.h dnl
154 ntsecpkg.h dnl
155 oaidl.h dnl
156 objbase.h dnl
157 objfwd.h dnl
158 objidl.h dnl
159 objsafe.h dnl
160 objsel.h dnl
161 ocidl.h dnl
162 odbcinst.h dnl
163 ole2.h dnl
164 ole2ver.h dnl
165 oleacc.h dnl
166 oleauto.h dnl
167 olectl.h dnl
168 olectlid.h dnl
169 oledlg.h dnl
170 ole.h dnl
171 oleidl.h dnl
172 poppack.h dnl
173 powrprof.h dnl
174 prsht.h dnl
175 psapi.h dnl
176 pshpack1.h dnl
177 pshpack2.h dnl
178 pshpack4.h dnl
179 pshpack8.h dnl
180 qedit.h dnl
181 rapi.h dnl
182 rasdlg.h dnl
183 raserror.h dnl
184 ras.h dnl
185 rassapi.h dnl
186 reason.h dnl
187 regstr.h dnl
188 richedit.h dnl
189 richole.h dnl
190 routprot.h dnl
191 rpcdce2.h dnl
192 rpcdce.h dnl
193 rpcdcep.h dnl
194 rpc.h dnl
195 rpcndr.h dnl
196 rpcnsi.h dnl
197 rpcnsip.h dnl
198 rpcnterr.h dnl
199 rpcproxy.h dnl
200 rtutils.h dnl
201 schannel.h dnl
202 schnlsp.h dnl
203 scrnsave.h dnl
204 sddl.h dnl
205 sdkddkver.h dnl
206 secext.h dnl
207 security.h dnl
208 servprov.h dnl
209 setupapi.h dnl
210 shellapi.h dnl
211 shldisp.h dnl
212 shlguid.h dnl
213 shlobj.h dnl
214 shlwapi.h dnl
215 shobjidl.h dnl
216 snmp.h dnl
217 specstrings.h dnl
218 sqlext.h dnl
219 sql.h dnl
220 sqltypes.h dnl
221 sqlucode.h dnl
222 sspi.h dnl
223 stm.h dnl
224 strmif.h dnl
225 subauth.h dnl
226 svcguid.h dnl
227 tlhelp32.h dnl
228 tmschema.h dnl
229 unknwn.h dnl
230 userenv.h dnl
231 usp10.h dnl
232 uxtheme.h dnl
233 vfw.h dnl
234 vidcap.h dnl
235 vmr9.h dnl
236 vptype.h dnl
237 winbase.h dnl
238 winber.h dnl
239 wincon.h dnl
240 wincrypt.h dnl
241 windef.h dnl
242 windns.h dnl
243 windows.h dnl
244 windowsx.h dnl
245 winerror.h dnl
246 wingdi.h dnl
247 wininet.h dnl
248 winioctl.h dnl
249 winldap.h dnl
250 winnetwk.h dnl
251 winnls.h dnl
252 winnt.h dnl
253 winperf.h dnl
254 winreg.h dnl
255 winresrc.h dnl
256 winsnmp.h dnl
257 winsock2.h dnl
258 winsock.h dnl
259 winspool.h dnl
260 winsvc.h dnl
261 winuser.h dnl
262 winver.h dnl
263 ws2spi.h dnl
264 ws2tcpip.h dnl
265 wsahelp.h dnl
266 wsipx.h dnl
267 wsnetbs.h dnl
268 wtsapi32.h dnl
269 wtypes.h dnl
270 xprtdefs.h dnl
271 zmouse.h dnl
272 ])# W32API_AT_PACKAGE_HEADERS
273
274 # W32API_AT_HASH_INCLUDE( HEADER )
275 # --------------------------------
276 # Emit a single "#include <HEADER>" statement into a generated
277 # program language source file.
278 #
279 m4_define([W32API_AT_HASH_INCLUDE],dnl
280 [[#include <$1>
281 ]])# W32API_AT_HASH_INCLUDE
282
283 # W32API_AT_CHECK_HEADERS_STANDALONE( LANG )
284 # ------------------------------------------
285 # Check compilability and self-containment of all package headers,
286 # when each is compiled individually, using the LANG compiler.
287 #
288 m4_define([W32API_AT_CHECK_HEADERS_STANDALONE],[MINGW_AT_LANG([$1])dnl
289 AT_BANNER([Header integrity checks: stand-alone compile; language = $1.])
290 m4_foreach_w([HEADER],W32API_AT_PACKAGE_HEADERS,[dnl
291 AT_SETUP([#include <]HEADER[>])AT_KEYWORDS([$1 $1-headers])
292 AS_VAR_APPEND([CPPFLAGS],[" -Wall -Wextra -Wsystem-headers"])
293 MINGW_AT_CHECK_COMPILE([dnl
294 #define __IN_W32API_TESTSUITE__ 1
295 W32API_AT_HASH_INCLUDE(HEADER)dnl
296 int main(){ return 0; }])
297 AT_CLEANUP
298 ])])# W32API_AT_CHECK_HEADERS_STANDALONE
299 #
300 # Run it, for each of LANG = C and LANG = C++
301 #
302 m4_foreach([LANG],[C,C++],[W32API_AT_CHECK_HEADERS_STANDALONE(LANG)])
303
304 # W32API_AT_CHECK_HEADERS_COMBINED( LANG )
305 # ----------------------------------------
306 # Check compilability of package headers, when all are included within
307 # a single translation unit, and compiled using the LANG compiler.
308 #
309 m4_define([W32API_AT_CHECK_HEADERS_COMBINED],[MINGW_AT_LANG([$1])dnl
310 AT_SETUP([#include all; language = $1])AT_KEYWORDS([$1 $1-headers])
311 AS_VAR_APPEND([CPPFLAGS],[" -Wall -Wextra -Wsystem-headers"])
312 m4_if([$1],[C],AS_VAR_APPEND([CPPFLAGS],[" -Wno-deprecated-declarations"]))
313 MINGW_AT_CHECK_COMPILE([dnl
314 m4_foreach_w([HEADER],W32API_AT_PACKAGE_HEADERS,[dnl
315 W32API_AT_HASH_INCLUDE(HEADER)])
316 int main(){ return __W32API_MAJOR_VERSION; }])
317 AT_CLEANUP
318 ])# W32API_AT_CHECK_HEADERS_COMBINED
319 #
320 # Run it, for each of LANG = C and LANG = C++
321 #
322 AT_BANNER([Header consistency checks: composite compile.])
323 m4_foreach([LANG],[C,C++],[W32API_AT_CHECK_HEADERS_COMBINED(LANG)])
324
325 # vim: filetype=config formatoptions=croql
326 # $RCSfile$: end of file