sal.h 13.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * Copyright (C) 2018 Alistair Leslie-Hughes
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef __WINE_SAL_H__
#define __WINE_SAL_H__

22 23
#define _Always_(exp)

24 25 26
#define _Analysis_noreturn_

#define _At_(a, b)
27 28
#define _At_buffer_(a, b, c, d)

29 30
#define _Check_return_

31 32 33
#define _COM_Outptr_
#define _COM_Outptr_result_maybenull_

34
#define _Deref_in_range_(cnt)
35
#define _Deref_out_
36
#define _Deref_out_z_
37 38
#define _Deref_out_opt_
#define _Deref_out_opt_z_
39
#define _Deref_out_range_(x, y)
40
#define _Deref_post_maybenull_
41 42
#define _Deref_post_opt_cap_(count)
#define _Deref_post_opt_valid_
43
#define _Deref_post_opt_z_cap_(count)
44 45
#define _Deref_post_valid_
#define _Deref_post_z_
46 47
#define _Deref_pre_maybenull_
#define _Deref_pre_z_
48
#define _Deref_prepost_opt_z_
49
#define _Deref_ret_z_
50 51

#define _Field_range_(min, max)
52 53 54

#define _In_
#define _In_bytecount_(count)
55 56
#define _In_bytecount_c_(count)
#define _In_bytecount_x_(count)
57
#define _In_count_(count)
58 59
#define _In_count_c_(count)
#define _In_count_x_(count)
60
#define _In_opt_
61 62 63
#define _In_opt_bytecount_(count)
#define _In_opt_bytecount_c_(count)
#define _In_opt_bytecount_x_(count)
64
#define _In_opt_count_(count)
65 66 67
#define _In_opt_count_c_(count)
#define _In_opt_count_x_(count)
#define _In_opt_ptrdiff_count_(count)
68
#define _In_opt_z_
69 70 71 72 73
#define _In_opt_z_count_(count)
#define _In_opt_z_count_c_(count)
#define _In_opt_z_bytecount_(count)
#define _In_opt_z_bytecount_c_(count)
#define _In_ptrdiff_count_(count)
74
#define _In_range_(min, max)
75 76
#define _In_reads_(count)
#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 81
#define _In_reads_or_z_(count)
#define _In_reads_or_z_opt_(count)
82 83
#define _In_reads_z_(count)
#define _In_z_
84 85 86 87
#define _In_z_bytecount_(count)
#define _In_z_bytecount_c_(count)
#define _In_z_count_(count)
#define _In_z_count_c_(count)
88 89

#define _Inout_
90
#define _Inout_bytecap_x_(count)
91 92
#define _Inout_cap_(count)
#define _Inout_opt_
93
#define _Inout_opt_cap_c_(count)
94
#define _Inout_opt_z_
95
#define _Inout_opt_z_bytecap_(count)
96 97
#define _Inout_updates_(count)
#define _Inout_updates_bytes_(count)
98
#define _Inout_updates_bytes_all_opt_(count)
99
#define _Inout_updates_bytes_opt_(count)
100
#define _Inout_updates_opt_(count)
101
#define _Inout_updates_z_(count)
102
#define _Inout_updates_opt_z_(count)
103 104 105 106 107
#define _Inout_z_
#define _Inout_z_bytecap_(count)
#define _Inout_z_cap_(count)
#define _Inout_z_cap_c_(count)

108 109 110
#define _Must_inspect_result_

#define _Null_
111 112 113
#define _Null_terminated_

#define _Out_
114
#define _Outptr_
115
#define _Out_bytecap_(count)
116 117
#define _Out_bytecap_c_(count)
#define _Out_bytecap_x_(count)
118 119 120
#define _Out_bytecapcount_(count)
#define _Out_bytecap_post_bytecount_(count1, count2)
#define _Out_cap_(count)
121 122 123
#define _Out_cap_c_(count)
#define _Out_cap_m_(count1, count2)
#define _Out_cap_x_(count)
124 125
#define _Out_cap_post_count_(count1, count2)
#define _Out_opt_
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
#define _Out_opt_bytecap_(count)
#define _Out_opt_bytecap_c_(count)
#define _Out_opt_bytecap_x_(count)
#define _Out_opt_bytecap_post_bytecount_(count1, count2)
#define _Out_opt_bytecapcount_(count)
#define _Out_opt_cap_(count)
#define _Out_opt_cap_m_(count1, count2)
#define _Out_opt_cap_c_(count)
#define _Out_opt_cap_x_(count)
#define _Out_opt_cap_post_count_(count1, count2)
#define _Out_opt_ptrdiff_cap_(count)
#define _Out_opt_z_bytecap_(count)
#define _Out_opt_z_bytecap_c_(count)
#define _Out_opt_z_bytecap_x_(count)
#define _Out_opt_z_bytecap_post_bytecount_(count1, count2)
141
#define _Out_opt_z_cap_(count)
142 143 144
#define _Out_opt_z_cap_c_(count)
#define _Out_opt_z_cap_m_(count1, count2)
#define _Out_opt_z_cap_x_(count)
145
#define _Out_opt_z_cap_post_count_(count1, count2)
146
#define _Out_ptrdiff_cap_(count)
147
#define _Out_writes_(count)
148
#define _Out_writes_all_(count)
149 150 151 152
#define _Out_writes_bytes_(count)
#define _Out_writes_bytes_all_(count)
#define _Out_writes_bytes_all_opt_(count)
#define _Out_writes_bytes_opt_(count)
153
#define _Out_writes_bytes_to_(count1, count2)
154
#define _Out_writes_bytes_to_opt_(count1, count2)
155 156 157
#define _Out_writes_opt_(count)
#define _Out_writes_opt_z_(count)
#define _Out_writes_to_(count1, count2)
158
#define _Out_writes_to_opt_(count1, count2)
159
#define _Out_writes_z_(count)
160 161 162 163
#define _Out_z_bytecap_(count)
#define _Out_z_bytecap_c_(count)
#define _Out_z_bytecap_x_(count)
#define _Out_z_bytecap_post_bytecount_(count1, count2)
164 165
#define _Out_z_cap_(count)
#define _Out_z_cap_c_(count)
166 167
#define _Out_z_cap_m_(count1, count2)
#define _Out_z_cap_x_(count)
168 169
#define _Out_z_cap_post_count_(count1, count2)

170
#define _Outptr_opt_
171 172 173
#define _Outptr_opt_result_buffer_(count)
#define _Outptr_opt_result_maybenull_
#define _Outptr_opt_result_z_
174
#define _Outptr_result_buffer_(count)
175
#define _Outptr_result_buffer_all_maybenull_(ptr)
176 177
#define _Outptr_result_buffer_maybenull_(count)
#define _Outptr_result_maybenull_
178
#define _Outptr_result_maybenull_z_
179
#define _Outptr_result_nullonfailure_
180
#define _Outptr_result_z_
181

182 183
#define _Post_count_(count)
#define _Post_count_c_(count)
184
#define _Post_equal_to_(exp)
185
#define _Post_invalid_
186
#define _Post_maybez_
187
#define _Post_ptr_invalid_
188
#define _Post_readable_byte_size_(count)
189 190
#define _Post_readable_size_(count)
#define _Post_satisfies_(exp)
191
#define _Post_writable_byte_size_(count)
192
#define _Post_writable_size_(count)
193 194
#define _Post_z_

195
#define _Pre_cap_for_(count)
196 197
#define _Pre_maybenull_
#define _Pre_notnull_
198
#define _Pre_null_
199
#define _Pre_opt_z_
200
#define _Pre_valid_
201
#define _Pre_writable_size_(count)
202
#define _Pre_z_
203
#define _Prepost_z_
204

205
#define _Printf_format_string_
206
#define _Printf_format_string_params_(count)
207

208 209 210 211
#define _Reserved_

#define _Result_nullonfailure_

212 213
#define _Ret_maybenull_
#define _Ret_maybenull_z_
214
#define _Ret_notnull_
215
#define _Ret_opt_
216 217
#define _Ret_opt_bytecap_(count)
#define _Ret_opt_bytecap_x_(count)
218
#define _Ret_opt_z_cap_(count)
219
#define _Ret_range_(exp,exp2)
220
#define _Ret_writes_bytes_maybenull_(count)
221
#define _Ret_writes_z_(count)
222 223
#define _Ret_z_

224 225
#define _Return_type_success_(count)

226 227
#define _Scanf_format_string_
#define _Scanf_format_string_params_(count)
228
#define _Scanf_s_format_string_
229 230
#define _Scanf_s_format_string_params_(count)

231 232
#define _Success_(exp)

233 234
#define _When_(exp1, exp2)

235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
#define __bcount(size)
#define __bcount_opt(size)

#define __deref_bcount(size)
#define __deref_bcount_opt(size)
#define __deref_ecount(size)
#define __deref_ecount_opt(size)
#define __deref_inout
#define __deref_inout_bcount(size)
#define __deref_inout_bcount_full(size)
#define __deref_inout_bcount_full_opt(size)
#define __deref_inout_bcount_nz(size)
#define __deref_inout_bcount_nz_opt(size)
#define __deref_inout_bcount_opt(size)
#define __deref_inout_bcount_part(size,length)
#define __deref_inout_bcount_part_opt(size,length)
#define __deref_inout_bcount_z(size)
#define __deref_inout_bcount_z_opt(size)
#define __deref_inout_ecount(size)
#define __deref_inout_ecount_full(size)
#define __deref_inout_ecount_full_opt(size)
#define __deref_inout_ecount_nz(size)
#define __deref_inout_ecount_nz_opt(size)
#define __deref_inout_ecount_opt(size)
#define __deref_inout_ecount_part(size,length)
#define __deref_inout_ecount_part_opt(size,length)
#define __deref_inout_ecount_z(size)
#define __deref_inout_ecount_z_opt(size)
#define __deref_inout_nz
#define __deref_inout_nz_opt
#define __deref_inout_opt
#define __deref_inout_z
#define __deref_inout_z_opt
#define __deref_opt_bcount(size)
#define __deref_opt_bcount_opt(size)
#define __deref_opt_ecount(size)
#define __deref_opt_ecount_opt(size)
#define __deref_opt_inout
#define __deref_opt_inout_bcount(size)
#define __deref_opt_inout_bcount_full(size)
#define __deref_opt_inout_bcount_full_opt(size)
#define __deref_opt_inout_bcount_nz(size)
#define __deref_opt_inout_bcount_nz_opt(size)
#define __deref_opt_inout_bcount_opt(size)
#define __deref_opt_inout_bcount_part(size,length)
#define __deref_opt_inout_bcount_part_opt(size,length)
#define __deref_opt_inout_bcount_z(size)
#define __deref_opt_inout_bcount_z_opt(size)
#define __deref_opt_inout_ecount(size)
#define __deref_opt_inout_ecount_full(size)
#define __deref_opt_inout_ecount_full_opt(size)
#define __deref_opt_inout_ecount_nz(size)
#define __deref_opt_inout_ecount_nz_opt(size)
#define __deref_opt_inout_ecount_opt(size)
#define __deref_opt_inout_ecount_part(size,length)
#define __deref_opt_inout_ecount_part_opt(size,length)
#define __deref_opt_inout_ecount_z(size)
#define __deref_opt_inout_ecount_z_opt(size)
#define __deref_opt_inout_nz
#define __deref_opt_inout_nz_opt
#define __deref_opt_inout_opt
#define __deref_opt_inout_z
#define __deref_opt_inout_z_opt
#define __deref_opt_out
#define __deref_opt_out_bcount(size)
#define __deref_opt_out_bcount_full(size)
#define __deref_opt_out_bcount_full_opt(size)
#define __deref_opt_out_bcount_nz_opt(size)
#define __deref_opt_out_bcount_opt(size)
#define __deref_opt_out_bcount_part(size,length)
#define __deref_opt_out_bcount_part_opt(size,length)
#define __deref_opt_out_bcount_z_opt(size)
#define __deref_opt_out_ecount(size)
#define __deref_opt_out_ecount_full(size)
#define __deref_opt_out_ecount_full_opt(size)
#define __deref_opt_out_ecount_nz_opt(size)
#define __deref_opt_out_ecount_opt(size)
#define __deref_opt_out_ecount_part(size,length)
#define __deref_opt_out_ecount_part_opt(size,length)
#define __deref_opt_out_ecount_z_opt(size)
#define __deref_opt_out_nz_opt
#define __deref_opt_out_opt
#define __deref_opt_out_z
#define __deref_opt_out_z_opt
#define __deref_out
#define __deref_out_bcount(size)
#define __deref_out_bcount_full(size)
#define __deref_out_bcount_full_opt(size)
#define __deref_out_bcount_nz(size)
#define __deref_out_bcount_nz_opt(size)
#define __deref_out_bcount_opt(size)
#define __deref_out_bcount_part(size,length)
#define __deref_out_bcount_part_opt(size,length)
#define __deref_out_bcount_z(size)
#define __deref_out_bcount_z_opt(size)
#define __deref_out_ecount(size)
#define __deref_out_ecount_full(size)
#define __deref_out_ecount_full_opt(size)
#define __deref_out_ecount_nz(size)
#define __deref_out_ecount_nz_opt(size)
#define __deref_out_ecount_opt(size)
#define __deref_out_ecount_part(size,length)
#define __deref_out_ecount_part_opt(size,length)
#define __deref_out_ecount_z(size)
#define __deref_out_ecount_z_opt(size)
#define __deref_out_nz
#define __deref_out_nz_opt
#define __deref_out_opt
#define __deref_out_z
#define __deref_out_z_opt

#define __ecount(size)
#define __ecount_opt(size)

349
/* #define __in */ /* conflicts with system headers */
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394
#define __in_bcount(size)
#define __in_bcount_nz(size)
#define __in_bcount_nz_opt(size)
#define __in_bcount_opt(size)
#define __in_bcount_z(size)
#define __in_bcount_z_opt(size)
#define __in_ecount(size)
#define __in_ecount_nz(size)
#define __in_ecount_nz_opt(size)
#define __in_ecount_opt(size)
#define __in_ecount_z(size)
#define __in_ecount_z_opt(size)
#define __in_nz
#define __in_nz_opt
#define __in_opt
#define __in_z
#define __in_z_opt
#define __inout
#define __inout_bcount(size)
#define __inout_bcount_full(size)
#define __inout_bcount_full_opt(size)
#define __inout_bcount_nz(size)
#define __inout_bcount_nz_opt(size)
#define __inout_bcount_opt(size)
#define __inout_bcount_part(size,length)
#define __inout_bcount_part_opt(size,length)
#define __inout_bcount_z(size)
#define __inout_bcount_z_opt(size)
#define __inout_ecount(size)
#define __inout_ecount_full(size)
#define __inout_ecount_full_opt(size)
#define __inout_ecount_nz(size)
#define __inout_ecount_nz_opt(size)
#define __inout_ecount_opt(size)
#define __inout_ecount_part(size,length)
#define __inout_ecount_part_opt(size,length)
#define __inout_ecount_z(size)
#define __inout_ecount_z_opt(size)
#define __inout_ecount_z_opt(size)
#define __inout_nz
#define __inout_nz_opt
#define __inout_opt
#define __inout_z
#define __inout_z_opt

395
/* #define __out */ /* conflicts with system headers */
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429
#define __out_bcount(size)
#define __out_bcount_full(size)
#define __out_bcount_full_opt(size)
#define __out_bcount_full_z(size)
#define __out_bcount_full_z_opt(size)
#define __out_bcount_nz(size)
#define __out_bcount_nz_opt(size)
#define __out_bcount_opt(size)
#define __out_bcount_part(size,length)
#define __out_bcount_part_opt(size,length)
#define __out_bcount_part_z(size,length)
#define __out_bcount_part_z_opt(size,length)
#define __out_bcount_z(size)
#define __out_bcount_z_opt(size)
#define __out_ecount(size)
#define __out_ecount_full(size)
#define __out_ecount_full_opt(size)
#define __out_ecount_full_z(size)
#define __out_ecount_full_z_opt(size)
#define __out_ecount_nz(size)
#define __out_ecount_nz_opt(size)
#define __out_ecount_opt(size)
#define __out_ecount_part(size,length)
#define __out_ecount_part_opt(size,length)
#define __out_ecount_part_z(size,length)
#define __out_ecount_part_z_opt(size,length)
#define __out_ecount_z(size)
#define __out_ecount_z_opt(size)
#define __out_nz
#define __out_nz_opt
#define __out_opt
#define __out_z
#define __out_z_opt

430
#endif