2 * Copyright (C) 2018 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_SAL_H__
20 #define __WINE_SAL_H__
24 #define _Analysis_noreturn_
27 #define _At_buffer_(a, b, c, d)
29 #define _Check_return_
32 #define _COM_Outptr_result_maybenull_
34 #define _Deref_in_range_(cnt)
37 #define _Deref_out_opt_
38 #define _Deref_out_opt_z_
39 #define _Deref_out_range_(x, y)
40 #define _Deref_post_maybenull_
41 #define _Deref_post_opt_cap_(count)
42 #define _Deref_post_opt_valid_
43 #define _Deref_post_opt_z_cap_(count)
44 #define _Deref_post_valid_
45 #define _Deref_post_z_
46 #define _Deref_pre_maybenull_
48 #define _Deref_prepost_opt_z_
51 #define _Field_range_(min, max)
54 #define _In_bytecount_(count)
55 #define _In_bytecount_c_(count)
56 #define _In_bytecount_x_(count)
57 #define _In_count_(count)
58 #define _In_count_c_(count)
59 #define _In_count_x_(count)
61 #define _In_opt_bytecount_(count)
62 #define _In_opt_bytecount_c_(count)
63 #define _In_opt_bytecount_x_(count)
64 #define _In_opt_count_(count)
65 #define _In_opt_count_c_(count)
66 #define _In_opt_count_x_(count)
67 #define _In_opt_ptrdiff_count_(count)
69 #define _In_opt_z_count_(count)
70 #define _In_opt_z_count_c_(count)
71 #define _In_opt_z_bytecount_(count)
72 #define _In_opt_z_bytecount_c_(count)
73 #define _In_ptrdiff_count_(count)
74 #define _In_range_(min, max)
75 #define _In_reads_(count)
76 #define _In_reads_bytes_(count)
77 #define _In_reads_bytes_opt_(count)
78 #define _In_reads_opt_(count)
79 #define _In_reads_opt_z_(count)
80 #define _In_reads_or_z_(count)
81 #define _In_reads_or_z_opt_(count)
82 #define _In_reads_z_(count)
84 #define _In_z_bytecount_(count)
85 #define _In_z_bytecount_c_(count)
86 #define _In_z_count_(count)
87 #define _In_z_count_c_(count)
90 #define _Inout_bytecap_x_(count)
91 #define _Inout_cap_(count)
92 #define _Inout_cap_c_(count)
94 #define _Inout_opt_cap_c_(count)
96 #define _Inout_opt_z_bytecap_(count)
97 #define _Inout_updates_(count)
98 #define _Inout_updates_bytes_(count)
99 #define _Inout_updates_bytes_all_opt_(count)
100 #define _Inout_updates_bytes_opt_(count)
101 #define _Inout_updates_opt_(count)
102 #define _Inout_updates_z_(count)
103 #define _Inout_updates_opt_z_(count)
105 #define _Inout_z_bytecap_(count)
106 #define _Inout_z_cap_(count)
107 #define _Inout_z_cap_c_(count)
109 #define _Must_inspect_result_
112 #define _Null_terminated_
116 #define _Out_bytecap_(count)
117 #define _Out_bytecap_c_(count)
118 #define _Out_bytecap_x_(count)
119 #define _Out_bytecapcount_(count)
120 #define _Out_bytecap_post_bytecount_(count1, count2)
121 #define _Out_cap_(count)
122 #define _Out_cap_c_(count)
123 #define _Out_cap_m_(count1, count2)
124 #define _Out_cap_x_(count)
125 #define _Out_cap_post_count_(count1, count2)
127 #define _Out_opt_bytecap_(count)
128 #define _Out_opt_bytecap_c_(count)
129 #define _Out_opt_bytecap_x_(count)
130 #define _Out_opt_bytecap_post_bytecount_(count1, count2)
131 #define _Out_opt_bytecapcount_(count)
132 #define _Out_opt_cap_(count)
133 #define _Out_opt_cap_m_(count1, count2)
134 #define _Out_opt_cap_c_(count)
135 #define _Out_opt_cap_x_(count)
136 #define _Out_opt_cap_post_count_(count1, count2)
137 #define _Out_opt_ptrdiff_cap_(count)
138 #define _Out_opt_z_bytecap_(count)
139 #define _Out_opt_z_bytecap_c_(count)
140 #define _Out_opt_z_bytecap_x_(count)
141 #define _Out_opt_z_bytecap_post_bytecount_(count1, count2)
142 #define _Out_opt_z_cap_(count)
143 #define _Out_opt_z_cap_c_(count)
144 #define _Out_opt_z_cap_m_(count1, count2)
145 #define _Out_opt_z_cap_x_(count)
146 #define _Out_opt_z_cap_post_count_(count1, count2)
147 #define _Out_ptrdiff_cap_(count)
148 #define _Out_writes_(count)
149 #define _Out_writes_all_(count)
150 #define _Out_writes_bytes_(count)
151 #define _Out_writes_bytes_all_(count)
152 #define _Out_writes_bytes_all_opt_(count)
153 #define _Out_writes_bytes_opt_(count)
154 #define _Out_writes_bytes_to_(count1, count2)
155 #define _Out_writes_bytes_to_opt_(count1, count2)
156 #define _Out_writes_opt_(count)
157 #define _Out_writes_opt_z_(count)
158 #define _Out_writes_to_(count1, count2)
159 #define _Out_writes_to_opt_(count1, count2)
160 #define _Out_writes_z_(count)
161 #define _Out_z_bytecap_(count)
162 #define _Out_z_bytecap_c_(count)
163 #define _Out_z_bytecap_x_(count)
164 #define _Out_z_bytecap_post_bytecount_(count1, count2)
165 #define _Out_z_cap_(count)
166 #define _Out_z_cap_c_(count)
167 #define _Out_z_cap_m_(count1, count2)
168 #define _Out_z_cap_x_(count)
169 #define _Out_z_cap_post_count_(count1, count2)
172 #define _Outptr_opt_result_buffer_(count)
173 #define _Outptr_opt_result_maybenull_
174 #define _Outptr_opt_result_z_
175 #define _Outptr_result_buffer_(count)
176 #define _Outptr_result_buffer_all_maybenull_(ptr)
177 #define _Outptr_result_buffer_maybenull_(count)
178 #define _Outptr_result_maybenull_
179 #define _Outptr_result_maybenull_z_
180 #define _Outptr_result_nullonfailure_
181 #define _Outptr_result_z_
183 #define _Post_count_(count)
184 #define _Post_count_c_(count)
185 #define _Post_equal_to_(exp)
186 #define _Post_invalid_
187 #define _Post_maybez_
188 #define _Post_ptr_invalid_
189 #define _Post_readable_byte_size_(count)
190 #define _Post_readable_size_(count)
191 #define _Post_satisfies_(exp)
192 #define _Post_writable_byte_size_(count)
193 #define _Post_writable_size_(count)
196 #define _Pre_cap_for_(count)
197 #define _Pre_maybenull_
198 #define _Pre_notnull_
202 #define _Pre_writable_size_(count)
206 #define _Printf_format_string_
207 #define _Printf_format_string_params_(count)
211 #define _Result_nullonfailure_
213 #define _Ret_maybenull_
214 #define _Ret_maybenull_z_
215 #define _Ret_notnull_
217 #define _Ret_opt_bytecap_(count)
218 #define _Ret_opt_bytecap_x_(count)
219 #define _Ret_opt_z_cap_(count)
220 #define _Ret_range_(exp,exp2)
221 #define _Ret_writes_bytes_maybenull_(count)
222 #define _Ret_writes_z_(count)
225 #define _Return_type_success_(count)
227 #define _Scanf_format_string_
228 #define _Scanf_format_string_params_(count)
229 #define _Scanf_s_format_string_
230 #define _Scanf_s_format_string_params_(count)
232 #define _Success_(exp)
234 #define _When_(exp1, exp2)
236 #define __bcount(size)
237 #define __bcount_opt(size)
239 #define __deref_bcount(size)
240 #define __deref_bcount_opt(size)
241 #define __deref_ecount(size)
242 #define __deref_ecount_opt(size)
243 #define __deref_inout
244 #define __deref_inout_bcount(size)
245 #define __deref_inout_bcount_full(size)
246 #define __deref_inout_bcount_full_opt(size)
247 #define __deref_inout_bcount_nz(size)
248 #define __deref_inout_bcount_nz_opt(size)
249 #define __deref_inout_bcount_opt(size)
250 #define __deref_inout_bcount_part(size,length)
251 #define __deref_inout_bcount_part_opt(size,length)
252 #define __deref_inout_bcount_z(size)
253 #define __deref_inout_bcount_z_opt(size)
254 #define __deref_inout_ecount(size)
255 #define __deref_inout_ecount_full(size)
256 #define __deref_inout_ecount_full_opt(size)
257 #define __deref_inout_ecount_nz(size)
258 #define __deref_inout_ecount_nz_opt(size)
259 #define __deref_inout_ecount_opt(size)
260 #define __deref_inout_ecount_part(size,length)
261 #define __deref_inout_ecount_part_opt(size,length)
262 #define __deref_inout_ecount_z(size)
263 #define __deref_inout_ecount_z_opt(size)
264 #define __deref_inout_nz
265 #define __deref_inout_nz_opt
266 #define __deref_inout_opt
267 #define __deref_inout_z
268 #define __deref_inout_z_opt
269 #define __deref_opt_bcount(size)
270 #define __deref_opt_bcount_opt(size)
271 #define __deref_opt_ecount(size)
272 #define __deref_opt_ecount_opt(size)
273 #define __deref_opt_inout
274 #define __deref_opt_inout_bcount(size)
275 #define __deref_opt_inout_bcount_full(size)
276 #define __deref_opt_inout_bcount_full_opt(size)
277 #define __deref_opt_inout_bcount_nz(size)
278 #define __deref_opt_inout_bcount_nz_opt(size)
279 #define __deref_opt_inout_bcount_opt(size)
280 #define __deref_opt_inout_bcount_part(size,length)
281 #define __deref_opt_inout_bcount_part_opt(size,length)
282 #define __deref_opt_inout_bcount_z(size)
283 #define __deref_opt_inout_bcount_z_opt(size)
284 #define __deref_opt_inout_ecount(size)
285 #define __deref_opt_inout_ecount_full(size)
286 #define __deref_opt_inout_ecount_full_opt(size)
287 #define __deref_opt_inout_ecount_nz(size)
288 #define __deref_opt_inout_ecount_nz_opt(size)
289 #define __deref_opt_inout_ecount_opt(size)
290 #define __deref_opt_inout_ecount_part(size,length)
291 #define __deref_opt_inout_ecount_part_opt(size,length)
292 #define __deref_opt_inout_ecount_z(size)
293 #define __deref_opt_inout_ecount_z_opt(size)
294 #define __deref_opt_inout_nz
295 #define __deref_opt_inout_nz_opt
296 #define __deref_opt_inout_opt
297 #define __deref_opt_inout_z
298 #define __deref_opt_inout_z_opt
299 #define __deref_opt_out
300 #define __deref_opt_out_bcount(size)
301 #define __deref_opt_out_bcount_full(size)
302 #define __deref_opt_out_bcount_full_opt(size)
303 #define __deref_opt_out_bcount_nz_opt(size)
304 #define __deref_opt_out_bcount_opt(size)
305 #define __deref_opt_out_bcount_part(size,length)
306 #define __deref_opt_out_bcount_part_opt(size,length)
307 #define __deref_opt_out_bcount_z_opt(size)
308 #define __deref_opt_out_ecount(size)
309 #define __deref_opt_out_ecount_full(size)
310 #define __deref_opt_out_ecount_full_opt(size)
311 #define __deref_opt_out_ecount_nz_opt(size)
312 #define __deref_opt_out_ecount_opt(size)
313 #define __deref_opt_out_ecount_part(size,length)
314 #define __deref_opt_out_ecount_part_opt(size,length)
315 #define __deref_opt_out_ecount_z_opt(size)
316 #define __deref_opt_out_nz_opt
317 #define __deref_opt_out_opt
318 #define __deref_opt_out_z
319 #define __deref_opt_out_z_opt
321 #define __deref_out_bcount(size)
322 #define __deref_out_bcount_full(size)
323 #define __deref_out_bcount_full_opt(size)
324 #define __deref_out_bcount_nz(size)
325 #define __deref_out_bcount_nz_opt(size)
326 #define __deref_out_bcount_opt(size)
327 #define __deref_out_bcount_part(size,length)
328 #define __deref_out_bcount_part_opt(size,length)
329 #define __deref_out_bcount_z(size)
330 #define __deref_out_bcount_z_opt(size)
331 #define __deref_out_ecount(size)
332 #define __deref_out_ecount_full(size)
333 #define __deref_out_ecount_full_opt(size)
334 #define __deref_out_ecount_nz(size)
335 #define __deref_out_ecount_nz_opt(size)
336 #define __deref_out_ecount_opt(size)
337 #define __deref_out_ecount_part(size,length)
338 #define __deref_out_ecount_part_opt(size,length)
339 #define __deref_out_ecount_z(size)
340 #define __deref_out_ecount_z_opt(size)
341 #define __deref_out_nz
342 #define __deref_out_nz_opt
343 #define __deref_out_opt
344 #define __deref_out_z
345 #define __deref_out_z_opt
347 #define __ecount(size)
348 #define __ecount_opt(size)
350 /* #define __in */ /* conflicts with system headers */
351 #define __in_bcount(size)
352 #define __in_bcount_nz(size)
353 #define __in_bcount_nz_opt(size)
354 #define __in_bcount_opt(size)
355 #define __in_bcount_z(size)
356 #define __in_bcount_z_opt(size)
357 #define __in_ecount(size)
358 #define __in_ecount_nz(size)
359 #define __in_ecount_nz_opt(size)
360 #define __in_ecount_opt(size)
361 #define __in_ecount_z(size)
362 #define __in_ecount_z_opt(size)
369 #define __inout_bcount(size)
370 #define __inout_bcount_full(size)
371 #define __inout_bcount_full_opt(size)
372 #define __inout_bcount_nz(size)
373 #define __inout_bcount_nz_opt(size)
374 #define __inout_bcount_opt(size)
375 #define __inout_bcount_part(size,length)
376 #define __inout_bcount_part_opt(size,length)
377 #define __inout_bcount_z(size)
378 #define __inout_bcount_z_opt(size)
379 #define __inout_ecount(size)
380 #define __inout_ecount_full(size)
381 #define __inout_ecount_full_opt(size)
382 #define __inout_ecount_nz(size)
383 #define __inout_ecount_nz_opt(size)
384 #define __inout_ecount_opt(size)
385 #define __inout_ecount_part(size,length)
386 #define __inout_ecount_part_opt(size,length)
387 #define __inout_ecount_z(size)
388 #define __inout_ecount_z_opt(size)
389 #define __inout_ecount_z_opt(size)
391 #define __inout_nz_opt
394 #define __inout_z_opt
396 /* #define __out */ /* conflicts with system headers */
397 #define __out_bcount(size)
398 #define __out_bcount_full(size)
399 #define __out_bcount_full_opt(size)
400 #define __out_bcount_full_z(size)
401 #define __out_bcount_full_z_opt(size)
402 #define __out_bcount_nz(size)
403 #define __out_bcount_nz_opt(size)
404 #define __out_bcount_opt(size)
405 #define __out_bcount_part(size,length)
406 #define __out_bcount_part_opt(size,length)
407 #define __out_bcount_part_z(size,length)
408 #define __out_bcount_part_z_opt(size,length)
409 #define __out_bcount_z(size)
410 #define __out_bcount_z_opt(size)
411 #define __out_ecount(size)
412 #define __out_ecount_full(size)
413 #define __out_ecount_full_opt(size)
414 #define __out_ecount_full_z(size)
415 #define __out_ecount_full_z_opt(size)
416 #define __out_ecount_nz(size)
417 #define __out_ecount_nz_opt(size)
418 #define __out_ecount_opt(size)
419 #define __out_ecount_part(size,length)
420 #define __out_ecount_part_opt(size,length)
421 #define __out_ecount_part_z(size,length)
422 #define __out_ecount_part_z_opt(size,length)
423 #define __out_ecount_z(size)
424 #define __out_ecount_z_opt(size)