[PSDK] Import some SAL headers from MS

Taken from https://github.com/microsoft/ChakraCore/tree/master/pal/inc/rt

* Move _Check_return_opt_ and _Check_return_wat_ to crtdefs.h
* Update sal.h from https://github.com/microsoft/ChakraCore/blob/master/pal/inc/rt/sal.h
* Import no_sal2.h from MS and remove the one in NDK
* Import specstrings.h from MS
* Import specstrings_strict.h from MS
* Add specstrings_undef.h (based on defines in specstrings_strict.h)
* Remove __REACTOS__ hacks from cdfs
This commit is contained in:
Timo Kreuzer 2020-10-24 14:18:09 +02:00
parent 95d873091b
commit 0e5a4d5afe
8 changed files with 2771 additions and 780 deletions

View file

@ -170,12 +170,6 @@ typedef PVOID PBCB; //**** Bcb's are now part of the cache module
#define BYTE_COUNT_EMBEDDED_NAME (32) #define BYTE_COUNT_EMBEDDED_NAME (32)
#ifdef __REACTOS__
#define __volatile volatile
#define _Unreferenced_parameter_
#define __field_range(a,b)
#define __analysis_assert(x)
#endif
// //
// The CD_MCB is used to store the mapping of logical file offset to // The CD_MCB is used to store the mapping of logical file offset to

View file

@ -426,6 +426,18 @@ typedef struct localeinfo_struct {
} }
#endif #endif
#if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN)
#define _Check_return_opt_ _Check_return_
#else
#define _Check_return_opt_
#endif
#if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN_WAT)
#define _Check_return_wat_ _Check_return_
#else
#define _Check_return_wat_
#endif
#pragma pack(pop) #pragma pack(pop)
#endif /* !_INC_CRTDEFS */ #endif /* !_INC_CRTDEFS */

View file

@ -1,707 +0,0 @@
#pragma once
#define _NO_SAL_2_H_
/* From sal.h */
#define _Always_(annos)
#define _Analysis_mode_(mode)
#define _Analysis_noreturn_
#define _Analysis_assume_(expr) __analysis_assume(expr)
#define _At_(target, annos)
#define _At_buffer_(target, iter, bound, annos)
#define _Check_return_
#define _COM_Outptr_
#define _COM_Outptr_opt_
#define _COM_Outptr_opt_result_maybenull_
#define _COM_Outptr_result_maybenull_
#define _Const_
#define _Deref_in_bound_
#define _Deref_in_range_(lb,ub)
#define _Deref_inout_bound_
#define _Deref_inout_z_
#define _Deref_inout_z_bytecap_c_(size)
#define _Deref_inout_z_cap_c_(size)
#define _Deref_opt_out_
#define _Deref_opt_out_opt_
#define _Deref_opt_out_opt_z_
#define _Deref_opt_out_z_
#define _Deref_out_
#define _Deref_out_bound_
#define _Deref_out_opt_
#define _Deref_out_opt_z_
#define _Deref_out_range_(lb,ub)
#define _Deref_out_z_
#define _Deref_out_z_bytecap_c_(size)
#define _Deref_out_z_cap_c_(size)
#define _Deref_post_bytecap_(size)
#define _Deref_post_bytecap_c_(size)
#define _Deref_post_bytecap_x_(size)
#define _Deref_post_bytecount_(size)
#define _Deref_post_bytecount_c_(size)
#define _Deref_post_bytecount_x_(size)
#define _Deref_post_cap_(size)
#define _Deref_post_cap_c_(size)
#define _Deref_post_cap_x_(size)
#define _Deref_post_count_(size)
#define _Deref_post_count_c_(size)
#define _Deref_post_count_x_(size)
#define _Deref_post_maybenull_
#define _Deref_post_notnull_
#define _Deref_post_null_
#define _Deref_post_opt_bytecap_(size)
#define _Deref_post_opt_bytecap_c_(size)
#define _Deref_post_opt_bytecap_x_(size)
#define _Deref_post_opt_bytecount_(size)
#define _Deref_post_opt_bytecount_c_(size)
#define _Deref_post_opt_bytecount_x_(size)
#define _Deref_post_opt_cap_(size)
#define _Deref_post_opt_cap_c_(size)
#define _Deref_post_opt_cap_x_(size)
#define _Deref_post_opt_count_(size)
#define _Deref_post_opt_count_c_(size)
#define _Deref_post_opt_count_x_(size)
#define _Deref_post_opt_valid_
#define _Deref_post_opt_valid_bytecap_(size)
#define _Deref_post_opt_valid_bytecap_c_(size)
#define _Deref_post_opt_valid_bytecap_x_(size)
#define _Deref_post_opt_valid_cap_(size)
#define _Deref_post_opt_valid_cap_c_(size)
#define _Deref_post_opt_valid_cap_x_(size)
#define _Deref_post_opt_z_
#define _Deref_post_opt_z_bytecap_(size)
#define _Deref_post_opt_z_bytecap_c_(size)
#define _Deref_post_opt_z_bytecap_x_(size)
#define _Deref_post_opt_z_cap_(size)
#define _Deref_post_opt_z_cap_c_(size)
#define _Deref_post_opt_z_cap_x_(size)
#define _Deref_post_valid_
#define _Deref_post_valid_bytecap_(size)
#define _Deref_post_valid_bytecap_c_(size)
#define _Deref_post_valid_bytecap_x_(size)
#define _Deref_post_valid_cap_(size)
#define _Deref_post_valid_cap_c_(size)
#define _Deref_post_valid_cap_x_(size)
#define _Deref_post_z_
#define _Deref_post_z_bytecap_(size)
#define _Deref_post_z_bytecap_c_(size)
#define _Deref_post_z_bytecap_x_(size)
#define _Deref_post_z_cap_(size)
#define _Deref_post_z_cap_c_(size)
#define _Deref_post_z_cap_x_(size)
#define _Deref_pre_bytecap_(size)
#define _Deref_pre_bytecap_c_(size)
#define _Deref_pre_bytecap_x_(size)
#define _Deref_pre_bytecount_(size)
#define _Deref_pre_bytecount_c_(size)
#define _Deref_pre_bytecount_x_(size)
#define _Deref_pre_cap_(size)
#define _Deref_pre_cap_c_(size)
#define _Deref_pre_cap_x_(size)
#define _Deref_pre_count_(size)
#define _Deref_pre_count_c_(size)
#define _Deref_pre_count_x_(size)
#define _Deref_pre_invalid_
#define _Deref_pre_maybenull_
#define _Deref_pre_notnull_
#define _Deref_pre_null_
#define _Deref_pre_opt_bytecap_(size)
#define _Deref_pre_opt_bytecap_c_(size)
#define _Deref_pre_opt_bytecap_x_(size)
#define _Deref_pre_opt_bytecount_(size)
#define _Deref_pre_opt_bytecount_c_(size)
#define _Deref_pre_opt_bytecount_x_(size)
#define _Deref_pre_opt_cap_(size)
#define _Deref_pre_opt_cap_c_(size)
#define _Deref_pre_opt_cap_x_(size)
#define _Deref_pre_opt_count_(size)
#define _Deref_pre_opt_count_c_(size)
#define _Deref_pre_opt_count_x_(size)
#define _Deref_pre_opt_valid_
#define _Deref_pre_opt_valid_bytecap_(size)
#define _Deref_pre_opt_valid_bytecap_c_(size)
#define _Deref_pre_opt_valid_bytecap_x_(size)
#define _Deref_pre_opt_valid_cap_(size)
#define _Deref_pre_opt_valid_cap_c_(size)
#define _Deref_pre_opt_valid_cap_x_(size)
#define _Deref_pre_opt_z_
#define _Deref_pre_opt_z_bytecap_(size)
#define _Deref_pre_opt_z_bytecap_c_(size)
#define _Deref_pre_opt_z_bytecap_x_(size)
#define _Deref_pre_opt_z_cap_(size)
#define _Deref_pre_opt_z_cap_c_(size)
#define _Deref_pre_opt_z_cap_x_(size)
#define _Deref_pre_readonly_
#define _Deref_pre_valid_
#define _Deref_pre_valid_bytecap_(size)
#define _Deref_pre_valid_bytecap_c_(size)
#define _Deref_pre_valid_bytecap_x_(size)
#define _Deref_pre_valid_cap_(size)
#define _Deref_pre_valid_cap_c_(size)
#define _Deref_pre_valid_cap_x_(size)
#define _Deref_pre_writeonly_
#define _Deref_pre_z_
#define _Deref_pre_z_bytecap_(size)
#define _Deref_pre_z_bytecap_c_(size)
#define _Deref_pre_z_bytecap_x_(size)
#define _Deref_pre_z_cap_(size)
#define _Deref_pre_z_cap_c_(size)
#define _Deref_pre_z_cap_x_(size)
#define _Deref_prepost_bytecap_(size)
#define _Deref_prepost_bytecap_x_(size)
#define _Deref_prepost_bytecount_(size)
#define _Deref_prepost_bytecount_x_(size)
#define _Deref_prepost_cap_(size)
#define _Deref_prepost_cap_x_(size)
#define _Deref_prepost_count_(size)
#define _Deref_prepost_count_x_(size)
#define _Deref_prepost_opt_bytecap_(size)
#define _Deref_prepost_opt_bytecap_x_(size)
#define _Deref_prepost_opt_bytecount_(size)
#define _Deref_prepost_opt_bytecount_x_(size)
#define _Deref_prepost_opt_cap_(size)
#define _Deref_prepost_opt_cap_x_(size)
#define _Deref_prepost_opt_count_(size)
#define _Deref_prepost_opt_count_x_(size)
#define _Deref_prepost_opt_valid_
#define _Deref_prepost_opt_valid_bytecap_(size)
#define _Deref_prepost_opt_valid_bytecap_x_(size)
#define _Deref_prepost_opt_valid_cap_(size)
#define _Deref_prepost_opt_valid_cap_x_(size)
#define _Deref_prepost_opt_z_
#define _Deref_prepost_opt_z_bytecap_(size)
#define _Deref_prepost_opt_z_cap_(size)
#define _Deref_prepost_valid_
#define _Deref_prepost_valid_bytecap_(size)
#define _Deref_prepost_valid_bytecap_x_(size)
#define _Deref_prepost_valid_cap_(size)
#define _Deref_prepost_valid_cap_x_(size)
#define _Deref_prepost_z_
#define _Deref_prepost_z_bytecap_(size)
#define _Deref_prepost_z_cap_(size)
#define _Deref_ret_bound_
#define _Deref_ret_opt_z_
#define _Deref_ret_range_(lb,ub)
#define _Deref_ret_z_
#define _Deref2_pre_readonly_
#define _Enum_is_bitflag_
#define _Field_range_(min,max)
#define _Field_size_(size)
#define _Field_size_bytes_(size)
#define _Field_size_bytes_full_(size)
#define _Field_size_bytes_full_opt_(size)
#define _Field_size_bytes_opt_(size)
#define _Field_size_bytes_part_(size, count)
#define _Field_size_bytes_part_opt_(size, count)
#define _Field_size_full_(size)
#define _Field_size_full_opt_(size)
#define _Field_size_opt_(size)
#define _Field_size_part_(size, count)
#define _Field_size_part_opt_(size, count)
#define _Field_z_
#define _Function_class_(x)
#define _Group_(annos)
#define _In_
#define _In_bound_
#define _In_bytecount_(size)
#define _In_bytecount_c_(size)
#define _In_bytecount_x_(size)
#define _In_count_(size)
#define _In_count_c_(size)
#define _In_count_x_(size)
#define _In_defensive_(annotes)
#define _In_opt_
#define _In_opt_bytecount_(size)
#define _In_opt_bytecount_c_(size)
#define _In_opt_bytecount_x_(size)
#define _In_opt_count_(size)
#define _In_opt_count_c_(size)
#define _In_opt_count_x_(size)
#define _In_opt_ptrdiff_count_(size)
#define _In_opt_z_
#define _In_opt_z_bytecount_(size)
#define _In_opt_z_bytecount_c_(size)
#define _In_opt_z_count_(size)
#define _In_opt_z_count_c_(size)
#define _In_ptrdiff_count_(size)
#define _In_range_(lb,ub)
#define _In_reads_(size)
#define _In_reads_bytes_(size)
#define _In_reads_bytes_opt_(size)
#define _In_reads_opt_(size)
#define _In_reads_opt_z_(size)
#define _In_reads_or_z_(size)
#define _In_reads_to_ptr_(ptr)
#define _In_reads_to_ptr_opt_(ptr)
#define _In_reads_to_ptr_opt_z_(ptr)
#define _In_reads_to_ptr_z_(ptr)
#define _In_reads_z_(size)
#define _In_z_
#define _In_z_bytecount_(size)
#define _In_z_bytecount_c_(size)
#define _In_z_count_(size)
#define _In_z_count_c_(size)
#define _Inout_
#define _Inout_bytecap_(size)
#define _Inout_bytecap_c_(size)
#define _Inout_bytecap_x_(size)
#define _Inout_bytecount_(size)
#define _Inout_bytecount_c_(size)
#define _Inout_bytecount_x_(size)
#define _Inout_cap_(size)
#define _Inout_cap_c_(size)
#define _Inout_cap_x_(size)
#define _Inout_count_(size)
#define _Inout_count_c_(size)
#define _Inout_count_x_(size)
#define _Inout_defensive_(annotes)
#define _Inout_opt_
#define _Inout_opt_bytecap_(size)
#define _Inout_opt_bytecap_c_(size)
#define _Inout_opt_bytecap_x_(size)
#define _Inout_opt_bytecount_(size)
#define _Inout_opt_bytecount_c_(size)
#define _Inout_opt_bytecount_x_(size)
#define _Inout_opt_cap_(size)
#define _Inout_opt_cap_c_(size)
#define _Inout_opt_cap_x_(size)
#define _Inout_opt_count_(size)
#define _Inout_opt_count_c_(size)
#define _Inout_opt_count_x_(size)
#define _Inout_opt_ptrdiff_count_(size)
#define _Inout_opt_z_
#define _Inout_opt_z_bytecap_(size)
#define _Inout_opt_z_bytecap_c_(size)
#define _Inout_opt_z_bytecap_x_(size)
#define _Inout_opt_z_bytecount_(size)
#define _Inout_opt_z_bytecount_c_(size)
#define _Inout_opt_z_cap_(size)
#define _Inout_opt_z_cap_c_(size)
#define _Inout_opt_z_cap_x_(size)
#define _Inout_opt_z_count_(size)
#define _Inout_opt_z_count_c_(size)
#define _Inout_ptrdiff_count_(size)
#define _Inout_updates_(size)
#define _Inout_updates_all_(size)
#define _Inout_updates_all_opt_(size)
#define _Inout_updates_bytes_(size)
#define _Inout_updates_bytes_all_(size)
#define _Inout_updates_bytes_all_opt_(size)
#define _Inout_updates_bytes_opt_(size)
#define _Inout_updates_bytes_to_(size,count)
#define _Inout_updates_bytes_to_opt_(size,count)
#define _Inout_updates_opt_(size)
#define _Inout_updates_opt_z_(size)
#define _Inout_updates_to_(size,count)
#define _Inout_updates_to_opt_(size,count)
#define _Inout_updates_z_(size)
#define _Inout_z_
#define _Inout_z_bytecap_(size)
#define _Inout_z_bytecap_c_(size)
#define _Inout_z_bytecap_x_(size)
#define _Inout_z_bytecount_(size)
#define _Inout_z_bytecount_c_(size)
#define _Inout_z_cap_(size)
#define _Inout_z_cap_c_(size)
#define _Inout_z_cap_x_(size)
#define _Inout_z_count_(size)
#define _Inout_z_count_c_(size)
#define _Interlocked_operand_
#define _Literal_
#define _Maybenull_
#define _Maybevalid_
#define _Maybe_raises_SEH_exception_
#define _Must_inspect_result_
#define _Notliteral_
#define _Notnull_
#define _Notref_
#define _Notvalid_
#define _Null_
#define _Null_terminated_
#define _NullNull_terminated_
#define _On_failure_(annos)
#define _Out_
#define _Out_bound_
#define _Out_bytecap_(size)
#define _Out_bytecap_c_(size)
#define _Out_bytecap_post_bytecount_(cap,count)
#define _Out_bytecap_x_(size)
#define _Out_bytecapcount_(capcount)
#define _Out_bytecapcount_x_(capcount)
#define _Out_cap_(size)
#define _Out_cap_c_(size)
#define _Out_cap_m_(mult,size)
#define _Out_cap_post_count_(cap,count)
#define _Out_cap_x_(size)
#define _Out_capcount_(capcount)
#define _Out_capcount_x_(capcount)
#define _Out_defensive_(annotes)
#define _Out_opt_
#define _Out_opt_bytecap_(size)
#define _Out_opt_bytecap_c_(size)
#define _Out_opt_bytecap_post_bytecount_(cap,count)
#define _Out_opt_bytecap_x_(size)
#define _Out_opt_bytecapcount_(capcount)
#define _Out_opt_bytecapcount_x_(capcount)
#define _Out_opt_cap_(size)
#define _Out_opt_cap_c_(size)
#define _Out_opt_cap_m_(mult,size)
#define _Out_opt_cap_post_count_(cap,count)
#define _Out_opt_cap_x_(size)
#define _Out_opt_capcount_(capcount)
#define _Out_opt_capcount_x_(capcount)
#define _Out_opt_ptrdiff_cap_(size)
#define _Out_opt_z_bytecap_(size)
#define _Out_opt_z_bytecap_c_(size)
#define _Out_opt_z_bytecap_post_bytecount_(cap,count)
#define _Out_opt_z_bytecap_x_(size)
#define _Out_opt_z_bytecapcount_(capcount)
#define _Out_opt_z_cap_(size)
#define _Out_opt_z_cap_c_(size)
#define _Out_opt_z_cap_m_(mult,size)
#define _Out_opt_z_cap_post_count_(cap,count)
#define _Out_opt_z_cap_x_(size)
#define _Out_opt_z_capcount_(capcount)
#define _Out_ptrdiff_cap_(size)
#define _Out_range_(lb,ub)
#define _Out_writes_(size)
#define _Out_writes_all_(size)
#define _Out_writes_all_opt_(size)
#define _Out_writes_bytes_(size)
#define _Out_writes_bytes_all_(size)
#define _Out_writes_bytes_all_opt_(size)
#define _Out_writes_bytes_opt_(size)
#define _Out_writes_bytes_to_(size,count)
#define _Out_writes_bytes_to_opt_(size,count)
#define _Out_writes_opt_(size)
#define _Out_writes_opt_z_(size)
#define _Out_writes_to_(size,count)
#define _Out_writes_to_opt_(size,count)
#define _Out_writes_to_ptr_(ptr)
#define _Out_writes_to_ptr_opt_(ptr)
#define _Out_writes_to_ptr_opt_z_(ptr)
#define _Out_writes_to_ptr_z_(ptr)
#define _Out_writes_z_(size)
#define _Out_z_bytecap_(size)
#define _Out_z_bytecap_c_(size)
#define _Out_z_bytecap_post_bytecount_(cap,count)
#define _Out_z_bytecap_x_(size)
#define _Out_z_bytecapcount_(capcount)
#define _Out_z_cap_(size)
#define _Out_z_cap_c_(size)
#define _Out_z_cap_m_(mult,size)
#define _Out_z_cap_post_count_(cap,count)
#define _Out_z_cap_x_(size)
#define _Out_z_capcount_(capcount)
#define _Outptr_
#define _Outptr_opt_
#define _Outptr_opt_result_buffer_(size)
#define _Outptr_opt_result_buffer_all_(size)
#define _Outptr_opt_result_buffer_all_maybenull_(size)
#define _Outptr_opt_result_buffer_maybenull_(size)
#define _Outptr_opt_result_buffer_to_(size, count)
#define _Outptr_opt_result_buffer_to_maybenull_(size, count)
#define _Outptr_opt_result_bytebuffer_(size)
#define _Outptr_opt_result_bytebuffer_all_(size)
#define _Outptr_opt_result_bytebuffer_all_maybenull_(size)
#define _Outptr_opt_result_bytebuffer_maybenull_(size)
#define _Outptr_opt_result_bytebuffer_to_(size, count)
#define _Outptr_opt_result_bytebuffer_to_maybenull_(size, count)
#define _Outptr_opt_result_maybenull_
#define _Outptr_opt_result_maybenull_z_
#define _Outptr_opt_result_nullonfailure_
#define _Outptr_opt_result_z_
#define _Outptr_result_buffer_(size)
#define _Outptr_result_buffer_all_(size)
#define _Outptr_result_buffer_all_maybenull_(size)
#define _Outptr_result_buffer_maybenull_(size)
#define _Outptr_result_buffer_to_(size, count)
#define _Outptr_result_buffer_to_maybenull_(size, count)
#define _Outptr_result_bytebuffer_(size)
#define _Outptr_result_bytebuffer_all_(size)
#define _Outptr_result_bytebuffer_all_maybenull_(size)
#define _Outptr_result_bytebuffer_maybenull_(size)
#define _Outptr_result_bytebuffer_to_(size, count)
#define _Outptr_result_bytebuffer_to_maybenull_(size, count)
#define _Outptr_result_maybenull_
#define _Outptr_result_maybenull_z_
#define _Outptr_result_nullonfailure_
#define _Outptr_result_z_
#define _Outref_
#define _Outref_result_buffer_(size)
#define _Outref_result_buffer_all_(size)
#define _Outref_result_buffer_all_maybenull_(size)
#define _Outref_result_buffer_maybenull_(size)
#define _Outref_result_buffer_to_(size, count)
#define _Outref_result_buffer_to_maybenull_(size, count)
#define _Outref_result_bytebuffer_(size)
#define _Outref_result_bytebuffer_all_(size)
#define _Outref_result_bytebuffer_all_maybenull_(size)
#define _Outref_result_bytebuffer_maybenull_(size)
#define _Outref_result_bytebuffer_to_(size, count)
#define _Outref_result_bytebuffer_to_maybenull_(size, count)
#define _Outref_result_maybenull_
#define _Outref_result_nullonfailure_
#define _Points_to_data_
#define _Post_
#define _Post_bytecap_(size)
#define _Post_bytecount_(size)
#define _Post_bytecount_c_(size)
#define _Post_bytecount_x_(size)
#define _Post_cap_(size)
#define _Post_count_(size)
#define _Post_count_c_(size)
#define _Post_count_x_(size)
#define _Post_defensive_
#define _Post_equal_to_(expr)
#define _Post_invalid_
#define _Post_maybenull_
#define _Post_maybez_
#define _Post_notnull_
#define _Post_null_
#define _Post_ptr_invalid_
#define _Post_readable_byte_size_(size)
#define _Post_readable_size_(size)
#define _Post_satisfies_(cond)
#define _Post_valid_
#define _Post_writable_byte_size_(size)
#define _Post_writable_size_(size)
#define _Post_z_
#define _Post_z_bytecount_(size)
#define _Post_z_bytecount_c_(size)
#define _Post_z_bytecount_x_(size)
#define _Post_z_count_(size)
#define _Post_z_count_c_(size)
#define _Post_z_count_x_(size)
#define _Pre_
#define _Pre_bytecap_(size)
#define _Pre_bytecap_c_(size)
#define _Pre_bytecap_x_(size)
#define _Pre_bytecount_(size)
#define _Pre_bytecount_c_(size)
#define _Pre_bytecount_x_(size)
#define _Pre_cap_(size)
#define _Pre_cap_c_(size)
#define _Pre_cap_c_one_
#define _Pre_cap_for_(param)
#define _Pre_cap_m_(mult,size)
#define _Pre_cap_x_(size)
#define _Pre_count_(size)
#define _Pre_count_c_(size)
#define _Pre_count_x_(size)
#define _Pre_defensive_
#define _Pre_equal_to_(expr)
#define _Pre_invalid_
#define _Pre_maybenull_
#define _Pre_notnull_
#define _Pre_null_
#define _Pre_opt_bytecap_(size)
#define _Pre_opt_bytecap_c_(size)
#define _Pre_opt_bytecap_x_(size)
#define _Pre_opt_bytecount_(size)
#define _Pre_opt_bytecount_c_(size)
#define _Pre_opt_bytecount_x_(size)
#define _Pre_opt_cap_(size)
#define _Pre_opt_cap_c_(size)
#define _Pre_opt_cap_c_one_
#define _Pre_opt_cap_for_(param)
#define _Pre_opt_cap_m_(mult,size)
#define _Pre_opt_cap_x_(size)
#define _Pre_opt_count_(size)
#define _Pre_opt_count_c_(size)
#define _Pre_opt_count_x_(size)
#define _Pre_opt_ptrdiff_cap_(ptr)
#define _Pre_opt_ptrdiff_count_(ptr)
#define _Pre_opt_valid_
#define _Pre_opt_valid_bytecap_(size)
#define _Pre_opt_valid_bytecap_c_(size)
#define _Pre_opt_valid_bytecap_x_(size)
#define _Pre_opt_valid_cap_(size)
#define _Pre_opt_valid_cap_c_(size)
#define _Pre_opt_valid_cap_x_(size)
#define _Pre_opt_z_
#define _Pre_opt_z_bytecap_(size)
#define _Pre_opt_z_bytecap_c_(size)
#define _Pre_opt_z_bytecap_x_(size)
#define _Pre_opt_z_cap_(size)
#define _Pre_opt_z_cap_c_(size)
#define _Pre_opt_z_cap_x_(size)
#define _Pre_ptrdiff_cap_(ptr)
#define _Pre_ptrdiff_count_(ptr)
#define _Pre_readable_byte_size_(size)
#define _Pre_readable_size_(size)
#define _Pre_readonly_
#define _Pre_satisfies_(cond)
#define _Pre_unknown_
#define _Pre_valid_
#define _Pre_valid_bytecap_(size)
#define _Pre_valid_bytecap_c_(size)
#define _Pre_valid_bytecap_x_(size)
#define _Pre_valid_cap_(size)
#define _Pre_valid_cap_c_(size)
#define _Pre_valid_cap_x_(size)
#define _Pre_writable_byte_size_(size)
#define _Pre_writable_size_(size)
#define _Pre_writeonly_
#define _Pre_z_
#define _Pre_z_bytecap_(size)
#define _Pre_z_bytecap_c_(size)
#define _Pre_z_bytecap_x_(size)
#define _Pre_z_cap_(size)
#define _Pre_z_cap_c_(size)
#define _Pre_z_cap_x_(size)
#define _Prepost_bytecount_(size)
#define _Prepost_bytecount_c_(size)
#define _Prepost_bytecount_x_(size)
#define _Prepost_count_(size)
#define _Prepost_count_c_(size)
#define _Prepost_count_x_(size)
#define _Prepost_opt_bytecount_(size)
#define _Prepost_opt_bytecount_c_(size)
#define _Prepost_opt_bytecount_x_(size)
#define _Prepost_opt_count_(size)
#define _Prepost_opt_count_c_(size)
#define _Prepost_opt_count_x_(size)
#define _Prepost_opt_valid_
#define _Prepost_opt_z_
#define _Prepost_valid_
#define _Prepost_z_
#define _Printf_format_string_
#define _Raises_SEH_exception_
#define _Readable_bytes_(size)
#define _Readable_elements_(size)
#define _Reserved_
#define _Result_nullonfailure_
#define _Result_zeroonfailure_
#define _Ret_
#define _Ret_bound_
#define _Ret_bytecap_(size)
#define _Ret_bytecap_c_(size)
#define _Ret_bytecap_x_(size)
#define _Ret_bytecount_(size)
#define _Ret_bytecount_c_(size)
#define _Ret_bytecount_x_(size)
#define _Ret_cap_(size)
#define _Ret_cap_c_(size)
#define _Ret_cap_x_(size)
#define _Ret_count_(size)
#define _Ret_count_c_(size)
#define _Ret_count_x_(size)
#define _Ret_maybenull_
#define _Ret_maybenull_z_
#define _Ret_notnull_
#define _Ret_null_
#define _Ret_opt_
#define _Ret_opt_bytecap_(size)
#define _Ret_opt_bytecap_c_(size)
#define _Ret_opt_bytecap_x_(size)
#define _Ret_opt_bytecount_(size)
#define _Ret_opt_bytecount_c_(size)
#define _Ret_opt_bytecount_x_(size)
#define _Ret_opt_cap_(size)
#define _Ret_opt_cap_c_(size)
#define _Ret_opt_cap_x_(size)
#define _Ret_opt_count_(size)
#define _Ret_opt_count_c_(size)
#define _Ret_opt_count_x_(size)
#define _Ret_opt_valid_
#define _Ret_opt_z_
#define _Ret_opt_z_bytecap_(size)
#define _Ret_opt_z_bytecount_(size)
#define _Ret_opt_z_cap_(size)
#define _Ret_opt_z_count_(size)
#define _Ret_range_(lb,ub)
#define _Ret_valid_
#define _Ret_writes_(size)
#define _Ret_writes_bytes_(size)
#define _Ret_writes_bytes_maybenull_(size)
#define _Ret_writes_bytes_to_(size,count)
#define _Ret_writes_bytes_to_maybenull_(size,count)
#define _Ret_writes_maybenull_(size)
#define _Ret_writes_maybenull_z_(size)
#define _Ret_writes_to_(size,count)
#define _Ret_writes_to_maybenull_(size,count)
#define _Ret_writes_z_(size)
#define _Ret_z_
#define _Ret_z_bytecap_(size)
#define _Ret_z_bytecount_(size)
#define _Ret_z_cap_(size)
#define _Ret_z_count_(size)
#define _Return_type_success_(expr)
#define _Scanf_format_string_
#define _Scanf_s_format_string_
#define _Strict_type_match_
#define _Struct_size_bytes_(size)
#define _Success_(expr)
#define _Unchanged_(e)
#define _Use_decl_annotations_
#define _Valid_
#define _When_(expr, annos)
#define _Writable_bytes_(size)
#define _Writable_elements_(size)
/* driverspecs.h */
#define _Dispatch_type_(type)
#define _IRQL_always_function_max_(irql)
#define _IRQL_always_function_min_(irql)
#define _IRQL_is_cancel_
#define _IRQL_raises_(irql)
#define _IRQL_requires_(irql)
#define _IRQL_requires_max_(irql)
#define _IRQL_requires_min_(irql)
#define _IRQL_requires_same_
#define _IRQL_restores_
#define _IRQL_restores_global_(kind,param)
#define _IRQL_saves_
#define _IRQL_saves_global_(kind,param)
#define _IRQL_uses_cancel_
#define _Kernel_clear_do_init_(yesNo)
#define _Kernel_float_restored_
#define _Kernel_float_saved_
#define _Kernel_float_used_
#define _Kernel_IoGetDmaAdapter_
#define _Kernel_releases_resource_(kind)
#define _Kernel_requires_resource_held_(kind)
#define _Kernel_requires_resource_not_held_(kind)
#define _Kernel_acquires_resource_(kind)
#define _Landmark_(name)
#define __prefast_operator_new_null
#define __prefast_operator_new_throws
/* concurrencysal.h */
#define _Benign_race_begin_ __pragma(warning(push))
#define _Benign_race_end_ __pragma(warning(pop))
#define _No_competing_thread_begin_ __pragma(warning(push))
#define _No_competing_thread_end_ __pragma(warning(pop))
#define _Acquires_exclusive_lock_(lock)
#define _Acquires_lock_(lock)
#define _Acquires_nonreentrant_lock_(lock)
#define _Acquires_shared_lock_(lock)
#define _Analysis_assume_lock_acquired_(lock)
#define _Analysis_assume_lock_released_(lock)
#define _Analysis_assume_lock_held_(lock)
#define _Analysis_assume_lock_not_held_(lock)
#define _Analysis_assume_same_lock_(lock1, lock2)
#define _Analysis_suppress_lock_checking_(lock)
#define _Create_lock_level_(level)
#define _Csalcat1_(x,y)
#define _Csalcat2_(x,y)
#define _Function_ignore_lock_checking_(lock)
#define _Guarded_by_(lock)
#define _Has_lock_kind_(kind)
#define _Has_lock_level_(level)
#define _Interlocked_
#define _Internal_lock_level_order_(a,b)
#define _Lock_level_order_(a,b)
#define _No_competing_thread_
#define _Post_same_lock_(lock1,lock2)
#define _Releases_exclusive_lock_(lock)
#define _Releases_lock_(lock)
#define _Releases_nonreentrant_lock_(lock)
#define _Releases_shared_lock_(lock)
#define _Requires_exclusive_lock_held_(lock)
#define _Requires_shared_lock_held_(lock)
#define _Requires_lock_held_(lock)
#define _Requires_lock_not_held_(lock)
#define _Requires_no_locks_held_
#define _Write_guarded_by_(lock)

544
sdk/include/psdk/no_sal2.h Normal file
View file

@ -0,0 +1,544 @@
/*
* PROJECT: ReactOS PSDK
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Renders the SAL annotations for documenting APIs harmless.
* COPYRIGHT: Microsoft Corporation.
* SOURCE: https://github.com/microsoft/ChakraCore/blob/master/pal/inc/rt/no_sal2.h
*/
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
/***
* no_sal2.h - renders the SAL annotations for documenting APIs harmless.
*
*
*Purpose:
* sal.h provides a set of SAL2 annotations to describe how a function uses its
* parameters - the assumptions it makes about them, and the guarantees it makes
* upon finishing. This file redefines all those annotation macros to be harmless.
* It is designed for use in down-level build environments where the tooling may
* be unhappy with the standard SAL2 macro definitions.
*
* [Public]
*
*
****/
#ifndef _NO_SAL_2_H_
#define _NO_SAL_2_H_
#undef __notnull
#define __notnull
#undef _When_
#define _When_(c,a)
#undef _At_
#define _At_(t,a)
#undef _At_buffer_
#define _At_buffer_(t,i,c,a)
#undef _Group_
#define _Group_(a)
#undef _Pre_
#define _Pre_
#undef _Post_
#define _Post_
#undef _Deref_
#define _Deref_
#undef _Null_
#define _Null_
#undef _Notnull_
#define _Notnull_
#undef _Maybenull_
#define _Maybenull_
#undef _Const_
#define _Const_
#undef _Check_return_
#define _Check_return_
#undef _Must_inspect_result_
#define _Must_inspect_result_
#undef _Pre_satisfies_
#define _Pre_satisfies_(e)
#undef _Post_satisfies_
#define _Post_satisfies_(e)
#undef _Writable_elements_
#define _Writable_elements_(s)
#undef _Writable_bytes_
#define _Writable_bytes_(s)
#undef _Readable_elements_
#define _Readable_elements_(s)
#undef _Readable_bytes_
#define _Readable_bytes_(s)
#undef _Null_terminated_
#define _Null_terminated_
#undef _NullNull_terminated_
#define _NullNull_terminated_
#undef _Valid_
#define _Valid_
#undef _Notvalid_
#define _Notvalid_
#undef _Success_
#define _Success_(c)
#undef _Return_type_success_
#define _Return_type_success_(c)
#undef _On_failure_
#define _On_failure_(a)
#undef _Always_
#define _Always_(a)
#undef _Use_decl_annotations_
#define _Use_decl_annotations_
#undef _Pre_defensive_
#define _Pre_defensive_
#undef _Post_defensive_
#define _Post_defensive_
#undef _Pre_unknown_
#define _Pre_unknown_
#undef _Acquires_lock_
#define _Acquires_lock_(e)
#undef _Releases_lock_
#define _Releases_lock_(e)
#undef _Requires_lock_held_
#define _Requires_lock_held_(e)
#undef _Requires_lock_not_held_
#define _Requires_lock_not_held_(e)
#undef _Requires_no_locks_held_
#define _Requires_no_locks_held_
#undef _Guarded_by_
#define _Guarded_by_(e)
#undef _Write_guarded_by_
#define _Write_guarded_by_(e)
#undef _Interlocked_
#define _Interlocked_
#undef _Post_same_lock_
#define _Post_same_lock_(e1,e2)
#undef _Benign_race_begin_
#define _Benign_race_begin_
#undef _Benign_race_end_
#define _Benign_race_end_
#undef _No_competing_thread_
#define _No_competing_thread_
#undef _No_competing_thread_begin_
#define _No_competing_thread_begin_
#undef _No_competing_thread_end_
#define _No_competing_thread_end_
#undef _Acquires_shared_lock_
#define _Acquires_shared_lock_(e)
#undef _Releases_shared_lock_
#define _Releases_shared_lock_(e)
#undef _Requires_shared_lock_held_
#define _Requires_shared_lock_held_(e)
#undef _Acquires_exclusive_lock_
#define _Acquires_exclusive_lock_(e)
#undef _Releases_exclusive_lock_
#define _Releases_exclusive_lock_(e)
#undef _Requires_exclusive_lock_held_
#define _Requires_exclusive_lock_held_(e)
#undef _Has_lock_kind_
#define _Has_lock_kind_(n)
#undef _Create_lock_level_
#define _Create_lock_level_(n)
#undef _Has_lock_level_
#define _Has_lock_level_(n)
#undef _Lock_level_order_
#define _Lock_level_order_(n1,n2)
#undef _Analysis_assume_lock_acquired_
#define _Analysis_assume_lock_acquired_(e)
#undef _Analysis_assume_lock_released_
#define _Analysis_assume_lock_released_(e)
#undef _Analysis_assume_lock_held_
#define _Analysis_assume_lock_held_(e)
#undef _Analysis_assume_lock_not_held_
#define _Analysis_assume_lock_not_held_(e)
#undef _Analysis_assume_same_lock_
#define _Analysis_assume_same_lock_(e)
#undef _In_
#define _In_
#undef _Out_
#define _Out_
#undef _Inout_
#define _Inout_
#undef _In_z_
#define _In_z_
#undef _Inout_z_
#define _Inout_z_
#undef _In_reads_
#define _In_reads_(s)
#undef _In_reads_bytes_
#define _In_reads_bytes_(s)
#undef _In_reads_z_
#define _In_reads_z_(s)
#undef _In_reads_or_z_
#define _In_reads_or_z_(s)
#undef _Out_writes_
#define _Out_writes_(s)
#undef _Out_writes_bytes_
#define _Out_writes_bytes_(s)
#undef _Out_writes_z_
#define _Out_writes_z_(s)
#undef _Inout_updates_
#define _Inout_updates_(s)
#undef _Inout_updates_bytes_
#define _Inout_updates_bytes_(s)
#undef _Inout_updates_z_
#define _Inout_updates_z_(s)
#undef _Out_writes_to_
#define _Out_writes_to_(s,c)
#undef _Out_writes_bytes_to_
#define _Out_writes_bytes_to_(s,c)
#undef _Out_writes_all_
#define _Out_writes_all_(s)
#undef _Out_writes_bytes_all_
#define _Out_writes_bytes_all_(s)
#undef _Inout_updates_to_
#define _Inout_updates_to_(s,c)
#undef _Inout_updates_bytes_to_
#define _Inout_updates_bytes_to_(s,c)
#undef _Inout_updates_all_
#define _Inout_updates_all_(s)
#undef _Inout_updates_bytes_all_
#define _Inout_updates_bytes_all_(s)
#undef _In_reads_to_ptr_
#define _In_reads_to_ptr_(p)
#undef _In_reads_to_ptr_z_
#define _In_reads_to_ptr_z_(p)
#undef _Out_writes_to_ptr_
#define _Out_writes_to_ptr_(p)
#undef _Out_writes_to_ptr_z_
#define _Out_writes_to_ptr_z_(p)
#undef _In_opt_
#define _In_opt_
#undef _Out_opt_
#define _Out_opt_
#undef _Inout_opt_
#define _Inout_opt_
#undef _In_opt_z_
#define _In_opt_z_
#undef _Inout_opt_z_
#define _Inout_opt_z_
#undef _In_reads_opt_
#define _In_reads_opt_(s)
#undef _In_reads_bytes_opt_
#define _In_reads_bytes_opt_(s)
#undef _Out_writes_opt_
#define _Out_writes_opt_(s)
#undef _Out_writes_bytes_opt_
#define _Out_writes_bytes_opt_(s)
#undef _Out_writes_opt_z_
#define _Out_writes_opt_z_(s)
#undef _Inout_updates_opt_
#define _Inout_updates_opt_(s)
#undef _Inout_updates_bytes_opt_
#define _Inout_updates_bytes_opt_(s)
#undef _Inout_updates_opt_z_
#define _Inout_updates_opt_z_(s)
#undef _Out_writes_to_opt_
#define _Out_writes_to_opt_(s,c)
#undef _Out_writes_bytes_to_opt_
#define _Out_writes_bytes_to_opt_(s,c)
#undef _Out_writes_all_opt_
#define _Out_writes_all_opt_(s)
#undef _Out_writes_bytes_all_opt_
#define _Out_writes_bytes_all_opt_(s)
#undef _Inout_updates_to_opt_
#define _Inout_updates_to_opt_(s,c)
#undef _Inout_updates_bytes_to_opt_
#define _Inout_updates_bytes_to_opt_(s,c)
#undef _Inout_updates_all_opt_
#define _Inout_updates_all_opt_(s)
#undef _Inout_updates_bytes_all_opt_
#define _Inout_updates_bytes_all_opt_(s)
#undef _In_reads_to_ptr_opt_
#define _In_reads_to_ptr_opt_(p)
#undef _In_reads_to_ptr_opt_z_
#define _In_reads_to_ptr_opt_z_(p)
#undef _Out_writes_to_ptr_opt_
#define _Out_writes_to_ptr_opt_(p)
#undef _Out_writes_to_ptr_opt_z_
#define _Out_writes_to_ptr_opt_z_(p)
#undef _Outptr_
#define _Outptr_
#undef _Outptr_opt_
#define _Outptr_opt_
#undef _Outptr_result_maybenull_
#define _Outptr_result_maybenull_
#undef _Outptr_opt_result_maybenull_
#define _Outptr_opt_result_maybenull_
#undef _Outptr_z_
#define _Outptr_z_
#undef _Outptr_opt_z_
#define _Outptr_opt_z_
#undef _Outptr_result_maybenull_z_
#define _Outptr_result_maybenull_z_
#undef _Outptr_opt_result_maybenull_z_
#define _Outptr_opt_result_maybenull_z_
#undef _COM_Outptr_
#define _COM_Outptr_
#undef _COM_Outptr_opt_
#define _COM_Outptr_opt_
#undef _COM_Outptr_result_maybenull_
#define _COM_Outptr_result_maybenull_
#undef _COM_Outptr_opt_result_maybenull_
#define _COM_Outptr_opt_result_maybenull_
#undef _Outptr_result_buffer_
#define _Outptr_result_buffer_(s)
#undef _Outptr_result_bytebuffer_
#define _Outptr_result_bytebuffer_(s)
#undef _Outptr_opt_result_buffer_
#define _Outptr_opt_result_buffer_(s)
#undef _Outptr_opt_result_bytebuffer_
#define _Outptr_opt_result_bytebuffer_(s)
#undef _Outptr_result_buffer_to_
#define _Outptr_result_buffer_to_(s,c)
#undef _Outptr_result_bytebuffer_to_
#define _Outptr_result_bytebuffer_to_(s,c)
#undef _Outptr_opt_result_buffer_to_
#define _Outptr_opt_result_buffer_to_(s,c)
#undef _Outptr_opt_result_bytebuffer_to_
#define _Outptr_opt_result_bytebuffer_to_(s,c)
#undef _Ret_
#define _Ret_
#undef _Ret_valid_
#define _Ret_valid_
#undef _Ret_z_
#define _Ret_z_
#undef _Ret_writes_
#define _Ret_writes_(s)
#undef _Ret_writes_bytes_
#define _Ret_writes_bytes_(s)
#undef _Ret_writes_z_
#define _Ret_writes_z_(s)
#undef _Ret_writes_to_
#define _Ret_writes_to_(s,c)
#undef _Ret_writes_bytes_to_
#define _Ret_writes_bytes_to_(s,c)
#undef _Ret_writes_maybenull_
#define _Ret_writes_maybenull_(s)
#undef _Ret_writes_bytes_maybenull_
#define _Ret_writes_bytes_maybenull_(s)
#undef _Ret_writes_to_maybenull_
#define _Ret_writes_to_maybenull_(s,c)
#undef _Ret_writes_bytes_to_maybenull_
#define _Ret_writes_bytes_to_maybenull_(s,c)
#undef _Ret_writes_maybenull_z_
#define _Ret_writes_maybenull_z_(s)
#undef _Ret_maybenull_
#define _Ret_maybenull_
#undef _Ret_maybenull_z_
#define _Ret_maybenull_z_
#undef _Field_size_
#define _Field_size_(s)
#undef _Field_size_opt_
#define _Field_size_opt_(s)
#undef _Field_size_bytes_
#define _Field_size_bytes_(s)
#undef _Field_size_bytes_opt_
#define _Field_size_bytes_opt_(s)
#undef _Field_size_part_
#define _Field_size_part_(s,c)
#undef _Field_size_part_opt_
#define _Field_size_part_opt_(s,c)
#undef _Field_size_bytes_part_
#define _Field_size_bytes_part_(s,c)
#undef _Field_size_bytes_part_opt_
#define _Field_size_bytes_part_opt_(s,c)
#undef _Field_size_full_
#define _Field_size_full_(s)
#undef _Field_size_full_opt_
#define _Field_size_full_opt_(s)
#undef _Field_size_bytes_full_
#define _Field_size_bytes_full_(s)
#undef _Field_size_bytes_full_opt_
#define _Field_size_bytes_full_opt_(s)
#undef _Printf_format_string_
#define _Printf_format_string_
#undef _Scanf_format_string_
#define _Scanf_format_string_
#undef _Scanf_s_format_string_
#define _Scanf_s_format_string_
#undef _Printf_format_string_params_
#define _Printf_format_string_params_(x)
#undef _Scanf_format_string_params_
#define _Scanf_format_string_params_(x)
#undef _Scanf_s_format_string_params_
#define _Scanf_s_format_string_params_(x)
#undef _In_range_
#define _In_range_(l,h)
#undef _Out_range_
#define _Out_range_(l,h)
#undef _Ret_range_
#define _Ret_range_(l,h)
#undef _Deref_in_range_
#define _Deref_in_range_(l,h)
#undef _Deref_out_range_
#define _Deref_out_range_(l,h)
#undef _Deref_inout_range_
#define _Deref_inout_range_(l,h)
#undef _Field_range_
#define _Field_range_(l,h)
#undef _Pre_equal_to_
#define _Pre_equal_to_(e)
#undef _Post_equal_to_
#define _Post_equal_to_(e)
#undef _Struct_size_bytes_
#define _Struct_size_bytes_(s)
#undef _Analysis_assume_
#define _Analysis_assume_
#undef _Analysis_mode_
#define _Analysis_mode_(m)
#undef _Analysis_noreturn_
#define _Analysis_noreturn_
#undef _Raises_SEH_exception_
#define _Raises_SEH_exception_
#undef _Maybe_raises_SEH_exception_
#define _Maybe_raises_SEH_exception_
#undef _Function_class_
#define _Function_class_(n)
#undef _Literal_
#define _Literal_
#undef _Notliteral_
#define _Notliteral_
#undef _Enum_is_bitflag_
#define _Enum_is_bitflag_
#undef _Strict_type_match_
#define _Strict_type_match_
#undef _Points_to_data_
#define _Points_to_data_
#undef _Interlocked_operand_
#define _Interlocked_operand_
#undef _IRQL_raises_
#define _IRQL_raises_(i)
#undef _IRQL_requires_
#define _IRQL_requires_(i)
#undef _IRQL_requires_max_
#define _IRQL_requires_max_(i)
#undef _IRQL_requires_min_
#define _IRQL_requires_min_(i)
#undef _IRQL_saves_
#define _IRQL_saves_
#undef _IRQL_saves_global_
#define _IRQL_saves_global_(k,s)
#undef _IRQL_restores_
#define _IRQL_restores_
#undef _IRQL_restores_global_
#define _IRQL_restores_global_(k,s)
#undef _IRQL_always_function_min_
#define _IRQL_always_function_min_(i)
#undef _IRQL_always_function_max_
#define _IRQL_always_function_max_(i)
#undef _IRQL_requires_same_
#define _IRQL_requires_same_
#undef _IRQL_uses_cancel_
#define _IRQL_uses_cancel_
#undef _IRQL_is_cancel_
#define _IRQL_is_cancel_
#undef _Kernel_float_saved_
#define _Kernel_float_saved_
#undef _Kernel_float_restored_
#define _Kernel_float_restored_
#undef _Kernel_float_used_
#define _Kernel_float_used_
#undef _Kernel_acquires_resource_
#define _Kernel_acquires_resource_(k)
#undef _Kernel_releases_resource_
#define _Kernel_releases_resource_(k)
#undef _Kernel_requires_resource_held_
#define _Kernel_requires_resource_held_(k)
#undef _Kernel_requires_resource_not_held_
#define _Kernel_requires_resource_not_held_(k)
#undef _Kernel_clear_do_init_
#define _Kernel_clear_do_init_(yn)
#undef _Kernel_IoGetDmaAdapter_
#define _Kernel_IoGetDmaAdapter_
#undef _Outref_
#define _Outref_
#undef _Outref_result_maybenull_
#define _Outref_result_maybenull_
#undef _Outref_result_buffer_
#define _Outref_result_buffer_(s)
#undef _Outref_result_bytebuffer_
#define _Outref_result_bytebuffer_(s)
#undef _Outref_result_buffer_to_
#define _Outref_result_buffer_to_(s,c)
#undef _Outref_result_bytebuffer_to_
#define _Outref_result_bytebuffer_to_(s,c)
#undef _Outref_result_buffer_all_
#define _Outref_result_buffer_all_(s)
#undef _Outref_result_bytebuffer_all_
#define _Outref_result_bytebuffer_all_(s)
#undef _Outref_result_buffer_maybenull_
#define _Outref_result_buffer_maybenull_(s)
#undef _Outref_result_bytebuffer_maybenull_
#define _Outref_result_bytebuffer_maybenull_(s)
#undef _Outref_result_buffer_to_maybenull_
#define _Outref_result_buffer_to_maybenull_(s,c)
#undef _Outref_result_bytebuffer_to_maybenull_
#define _Outref_result_bytebuffer_to_maybenull_(s,c)
#undef _Outref_result_buffer_all_maybenull_
#define _Outref_result_buffer_all_maybenull_(s)
#undef _Outref_result_bytebuffer_all_maybenull_
#define _Outref_result_bytebuffer_all_maybenull_(s)
#undef _In_defensive_
#define _In_defensive_(a)
#undef _Out_defensive_
#define _Out_defensive_(a)
#undef _Inout_defensive_
#define _Inout_defensive_(a)
#undef _Outptr_result_nullonfailure_
#define _Outptr_result_nullonfailure_
#undef _Outptr_opt_result_nullonfailure_
#define _Outptr_opt_result_nullonfailure_
#undef _Outref_result_nullonfailure_
#define _Outref_result_nullonfailure_
#undef _Result_nullonfailure_
#define _Result_nullonfailure_
#undef _Result_zeroonfailure_
#define _Result_zeroonfailure_
#undef _Acquires_nonreentrant_lock_
#define _Acquires_nonreentrant_lock_(e)
#undef _Releases_nonreentrant_lock_
#define _Releases_nonreentrant_lock_(e)
#undef _Reserved_
#define _Reserved_ _Pre_equal_to_(0) _Pre_ _Null_
#undef _Pre_z_
#define _Pre_z_ _Pre_ _Null_terminated_
#undef _Post_z_
#define _Post_z_ _Post_ _Null_terminated_
#undef _Prepost_z_
#define _Prepost_z_ _Pre_z_ _Post_z_
#undef _Pre_null_
#define _Pre_null_ _Pre_ _Null_
#undef _Pre_maybenull_
#define _Pre_maybenull_ _Pre_ _Maybenull_
#undef _Pre_notnull_
#define _Pre_notnull_ _Pre_ _Notnull_
#undef _Pre_valid_
#define _Pre_valid_ _Pre_notnull_ _Pre_ _Valid_
#undef _Pre_opt_valid_
#define _Pre_opt_valid_ _Pre_maybenull_ _Pre_ _Valid_
#undef _Post_valid_
#define _Post_valid_ _Post_ _Valid_
#undef _Post_invalid_
#define _Post_invalid_ _Post_ _Deref_ _Notvalid_
#undef _Post_ptr_invalid_
#define _Post_ptr_invalid_ _Post_ _Notvalid_
#undef _Pre_readable_size_
#define _Pre_readable_size_(s) _Pre_ _Readable_elements_(s) _Pre_ _Valid_
#undef _Pre_writable_size_
#define _Pre_writable_size_(s) _Pre_ _Writable_elements_(s)
#undef _Pre_readable_byte_size_
#define _Pre_readable_byte_size_(s) _Pre_ _Readable_bytes_(s) _Pre_ _Valid_
#undef _Pre_writable_byte_size_
#define _Pre_writable_byte_size_(s) _Pre_ _Writable_bytes_(s)
#undef _Post_readable_size_
#define _Post_readable_size_(s) _Post_ _Readable_elements_(s) _Post_ _Valid_
#undef _Post_writable_size_
#define _Post_writable_size_(s) _Post_ _Writable_elements_(s)
#undef _Post_readable_byte_size_
#define _Post_readable_byte_size_(s) _Post_ _Readable_bytes_(s) _Post_ _Valid_
#undef _Post_writable_byte_size_
#define _Post_writable_byte_size_(s) _Post_ _Writable_bytes_(s)
#endif /* _NO_SAL_2_H_ */

View file

@ -3,7 +3,7 @@
* LICENSE: MIT (https://spdx.org/licenses/MIT) * LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Standard Annotation Language (SAL) definitions * PURPOSE: Standard Annotation Language (SAL) definitions
* COPYRIGHT: Microsoft Corporation. * COPYRIGHT: Microsoft Corporation.
* SOURCE: https://github.com/microsoft/service-fabric/blob/master/src/prod/src/pal/src/internal/rt/sal.h * SOURCE: https://github.com/microsoft/ChakraCore/blob/master/pal/inc/rt/sal.h
*/ */
// ------------------------------------------------------------ // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved. // Copyright (c) Microsoft Corporation. All rights reserved.
@ -26,7 +26,7 @@
The comments in this file are intended to give basic understanding of The comments in this file are intended to give basic understanding of
the usage of SAL, the Microsoft Source Code Annotation Language. the usage of SAL, the Microsoft Source Code Annotation Language.
For more details, please see http://go.microsoft.com/fwlink/?LinkID=242134 For more details, please see https://go.microsoft.com/fwlink/?LinkID=242134
The macros are defined in 3 layers, plus the structural set: The macros are defined in 3 layers, plus the structural set:
@ -2611,8 +2611,8 @@ extern "C" {
#else // ][ #else // ][
#ifndef PAL_STDCPP_COMPAT #ifndef PAL_STDCPP_COMPAT
#define __null #define __null
#endif // !PAL_STDCPP_COMPAT
#define __notnull #define __notnull
#endif // !PAL_STDCPP_COMPAT
#define __maybenull #define __maybenull
#define __readonly #define __readonly
#define __notreadonly #define __notreadonly
@ -2667,10 +2667,6 @@ buffer, use the table in the buffer annotations section.
#define __out _SAL1_Source_(__out, (), _Out_) #define __out _SAL1_Source_(__out, (), _Out_)
#endif // !PAL_STDCPP_COMPAT #endif // !PAL_STDCPP_COMPAT
#define __in_xcount(size) _SAL1_Source_(__in_xcount, (size), __in _Pre_ __inexpressible_readableTo(size))
#define __in_xcount_opt(size) _SAL1_Source_(__in_xcount_opt, (size), __in_xcount(size) __exceptthat __maybenull)
#define __out_xcount(size) _SAL1_Source_(__out_xcount, (size), __xcount(size) _Post_ __valid __refparam)
#define __ecount(size) _SAL1_Source_(__ecount, (size), __notnull __elem_writableTo(size)) #define __ecount(size) _SAL1_Source_(__ecount, (size), __notnull __elem_writableTo(size))
#define __bcount(size) _SAL1_Source_(__bcount, (size), __notnull __byte_writableTo(size)) #define __bcount(size) _SAL1_Source_(__bcount, (size), __notnull __byte_writableTo(size))
#define __in_ecount(size) _SAL1_Source_(__in_ecount, (size), _In_reads_(size)) #define __in_ecount(size) _SAL1_Source_(__in_ecount, (size), _In_reads_(size))
@ -2873,7 +2869,7 @@ of each annotation, see the advanced annotations section.
#define __success(expr) _Success_(expr) #define __success(expr) _Success_(expr)
#define __nullterminated _Null_terminated_ #define __nullterminated _Null_terminated_
#define __nullnullterminated #define __nullnullterminated
#define __clr_reserved _SAL1_Source_(__reserved, (), _Reserved_) #define __reserved _SAL1_Source_(__reserved, (), _Reserved_)
#define __checkReturn _SAL1_Source_(__checkReturn, (), _Check_return_) #define __checkReturn _SAL1_Source_(__checkReturn, (), _Check_return_)
#define __typefix(ctype) _SAL1_Source_(__typefix, (ctype), __inner_typefix(ctype)) #define __typefix(ctype) _SAL1_Source_(__typefix, (ctype), __inner_typefix(ctype))
#define __override __inner_override #define __override __inner_override
@ -2966,3 +2962,4 @@ __PRIMOP(int, _In_function_class_(__In_impl_ char*);)
// Rotor doesn't need concurrency sal. // Rotor doesn't need concurrency sal.
// #include <ConcurrencySal.h> // #include <ConcurrencySal.h>

View file

@ -1,82 +1,544 @@
/* /*
* specstrings.h * PROJECT: ReactOS PSDK
* * LICENSE: MIT (https://spdx.org/licenses/MIT)
* Standard Annotation Language (SAL) definitions * PURPOSE: Support for markers for documenting the semantics of APIs
* * COPYRIGHT: Microsoft Corporation.
* This file is part of the ReactOS PSDK package. * SOURCE: https://github.com/microsoft/ChakraCore/blob/master/pal/inc/rt/specstrings.h
*
* Contributors:
* Timo Kreuzer (timo.kreuzer@reactos.org)
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/ */
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
#pragma once
//
#ifndef SPECSTRINGS_H
#define SPECSTRINGS_H #define SPECSTRINGS_H
/***
*specstrings.h - support for markers for documenting the semantics of APIs
*
*
* [Public]
****/
/*************************************************************************
* See specstrings_strict.h for documentation of all user visible macros.
*************************************************************************/
#if _MSC_VER
#pragma once
#endif
#if !defined(_SAL_VERSION_SAL2)
#if defined(__BUILDMACHINE__) || defined(_USE_SAL2_ONLY)
#define _SAL_VERSION_SAL2(_A) SAL_2_Clean_Violation_using ## _A
#else
#define _SAL_VERSION_SAL2(_A)
#endif
#ifdef _USE_SAL2_ONLY
#define _SAL2_STRICT
#define _SAL_VERSION_CHECK(_A) _SAL_VERSION_SAL2(_A)
#else
#define _SAL_VERSION_CHECK(_A)
#endif
#ifndef SAL_VERSION_CHECK
#define SAL_VERSION_CHECK(_A) _SAL_VERSION_CHECK(_A)
#define SAL_VERSION_SAL2(_A) _SAL_VERSION_SAL2(_A)
#endif
#endif
#include <sal.h> #include <sal.h>
#include <driverspecs.h>
#define __field_bcount(size) __notnull __byte_writableTo(size) #ifndef __SAL_H_FULL_VER
#define __field_bcount_full(size) __notnull __byte_writableTo(size) __byte_readableTo(size) #define __SAL_H_FULL_VER 140050727
#define __field_ecount(size) __notnull __elem_writableTo(size) #endif
#define __post_invalid _Post_ __notvalid
#define __deref_in #ifdef __cplusplus
#define __deref_in_ecount(size) extern "C" {
#define __deref_in_bcount(size) #endif
#define __deref_in_opt
#define __deref_in_ecount_opt(size) /* version specific fixes to bring sal.h upto date */
#define __deref_in_bcount_opt(size) #if __SAL_H_FULL_VER <= 140050727
#define __deref_opt_in
#define __deref_opt_in_ecount(size) #if !defined(__midl) && defined(_PREFAST_) && _MSC_VER >= 1000 // [
#define __deref_opt_in_bcount(size)
#define __deref_opt_in_opt /* Missing from RTM sal.h */
#define __deref_opt_in_ecount_opt(size) #define __inner_bound _SA_annotes0(SAL_bound)
#define __deref_opt_in_bcount_opt(size) #define __inner_range(lb,ub) _SA_annotes2(SAL_range,lb,ub)
#define __out_awcount(expr,size) #define __inner_assume_bound_dec __inline __nothrow void __AssumeBoundInt(_Post_ __inner_bound int i) {i;}
#define __in_awcount(expr,size) #define __inner_assume_bound(i) __AssumeBoundInt(i);
#define __nullnullterminated #define __inner_allocator _SA_annotes0(SAL_allocator)
#define __in_data_source(src_sym)
#define __kernel_entry #define __static_context(ctx, annotes) \
#define __range(lb,ub) _SA_annotes1(SAL_context,ctx) _Group_(__nop_impl(annotes))
#define __in_bound
#define __out_bound #define __failure(x) __static_context(SAL_return_convention, \
#define __in_range(lb,ub) _SA_annotes1(SAL_failure,x))
#define __out_range(lb,ub)
#define __deref_in_range(lb,ub) __ANNOTATION(SAL_valueUndefined());
#define __deref_out_range(lb,ub) #define __valueUndefined _SA_annotes0(SAL_valueUndefined)
enum __SAL_failureKind{__failureUnspecified = 0, __failureUndefined = 1};
__ANNOTATION(SAL_failureDefault(enum __SAL_failureKind));
#define __failureDefault(kind) __static_context(SAL_return_convention, \
_SA_annotes1(SAL_failureDefault,kind))
#else // ][
#define __inner_bound
#define __inner_range(lb,ub)
#define __inner_assume_bound_dec
#define __inner_assume_bound(i)
#define __inner_allocator
#define __static_context(ctx, annotes)
#define __failure(x)
#define __valueUndefined
#define __failureDefault(x)
#endif // ]
#define __xcount(size) __notnull __inexpressible_writableTo(size)
#define __in_xcount(size) __in _Pre_ __inexpressible_readableTo(size)
#define __out_xcount(size) __xcount(size) _Post_ __valid __refparam
#define __out_xcount_part(size,length) __out_xcount(size) _Post_ __inexpressible_readableTo(length)
#define __out_xcount_full(size) __out_xcount_part(size,size)
#define __inout_xcount(size) __out_xcount(size) _Pre_ __valid
#define __inout_xcount_part(size,length) __out_xcount_part(size,length) _Pre_ __valid _Pre_ __inexpressible_readableTo(length)
#define __inout_xcount_full(size) __inout_xcount_part(size,size)
#define __xcount_opt(size) __xcount(size) __exceptthat __maybenull
#define __in_xcount_opt(size) __in_xcount(size) __exceptthat __maybenull
#define __out_xcount_opt(size) __out_xcount(size) __exceptthat __maybenull
#define __out_xcount_part_opt(size,length) __out_xcount_part(size,length) __exceptthat __maybenull
#define __out_xcount_full_opt(size) __out_xcount_full(size) __exceptthat __maybenull
#define __inout_xcount_opt(size) __inout_xcount(size) __exceptthat __maybenull
#define __inout_xcount_part_opt(size,length) __inout_xcount_part(size,length) __exceptthat __maybenull
#define __inout_xcount_full_opt(size) __inout_xcount_full(size) __exceptthat __maybenull
#define __deref_xcount(size) __ecount(1) _Post_ __elem_readableTo(1) _Post_ __deref __notnull _Post_ __deref __inexpressible_writableTo(size)
#define __deref_in __in _Pre_ __deref __deref __readonly
#define __deref_in_ecount(size) __deref_in _Pre_ __deref __elem_readableTo(size)
#define __deref_in_bcount(size) __deref_in _Pre_ __deref __byte_readableTo(size)
#define __deref_in_xcount(size) __deref_in _Pre_ __deref __inexpressible_readableTo(size)
#define __deref_out_xcount(size) __deref_xcount(size) _Post_ __deref __valid __refparam
#define __deref_out_xcount_part(size,length) __deref_out_xcount(size) _Post_ __deref __inexpressible_readableTo(length)
#define __deref_out_xcount_full(size) __deref_out_xcount_part(size,size)
#define __deref_out_xcount(size) __deref_xcount(size) _Post_ __deref __valid __refparam
#define __inout_xcount_opt(size) __inout_xcount(size) __exceptthat __maybenull
#define __inout_xcount_part_opt(size,length) __inout_xcount_part(size,length) __exceptthat __maybenull
#define __inout_xcount_full_opt(size) __inout_xcount_full(size) __exceptthat __maybenull
#define __deref_xcount(size) __ecount(1) _Post_ __elem_readableTo(1) _Post_ __deref __notnull _Post_ __deref __inexpressible_writableTo(size)
#define __deref_in __in _Pre_ __deref __deref __readonly
#define __deref_in_ecount(size) __deref_in _Pre_ __deref __elem_readableTo(size)
#define __deref_in_bcount(size) __deref_in _Pre_ __deref __byte_readableTo(size)
#define __deref_in_xcount(size) __deref_in _Pre_ __deref __inexpressible_readableTo(size)
#define __deref_out_xcount(size) __deref_xcount(size) _Post_ __deref __valid __refparam
#define __deref_out_xcount_part(size,length) __deref_out_xcount(size) _Post_ __deref __inexpressible_readableTo(length)
#define __deref_out_xcount_full(size) __deref_out_xcount_part(size,size)
#define __deref_out_xcount(size) __deref_xcount(size) _Post_ __deref __valid __refparam
#define __deref_inout_xcount(size) __deref_inout _Pre_ __deref __inexpressible_writableTo(size) _Post_ __deref __inexpressible_writableTo(size)
#define __deref_inout_xcount_part(size,length) __deref_inout_xcount(size) _Pre_ __deref __inexpressible_readableTo(length) _Post_ __deref __inexpressible_readableTo(length)
#define __deref_inout_xcount_full(size) __deref_inout_xcount_part(size,size)
#define __deref_xcount_opt(size) __deref_xcount(size) _Post_ __deref __exceptthat __maybenull
#define __deref_in_opt __deref_in _Pre_ __deref __exceptthat __maybenull
#define __deref_in_opt_out __deref_inout _Pre_ __deref __exceptthat __maybenull _Post_ __deref __notnull
#define __deref_in_ecount_opt(size) __deref_in_ecount(size) _Pre_ __deref __exceptthat __maybenull
#define __deref_in_bcount_opt(size) __deref_in_bcount(size) _Pre_ __deref __exceptthat __maybenull
#define __deref_in_xcount_opt(size) __deref_in_xcount(size) _Pre_ __deref __exceptthat __maybenull
#define __deref_out_xcount_opt(size) __deref_out_xcount(size) _Post_ __deref __exceptthat __maybenull
#define __deref_out_xcount_part_opt(size,length) __deref_out_xcount_part(size,length) _Post_ __deref __exceptthat __maybenull
#define __deref_out_xcount_full_opt(size) __deref_out_xcount_full(size) _Post_ __deref __exceptthat __maybenull
#define __deref_inout_xcount_opt(size) __deref_inout_xcount(size) _Pre_ __deref __exceptthat __maybenull _Post_ __deref __exceptthat __maybenull
#define __deref_inout_xcount_part_opt(size,length) __deref_inout_xcount_part(size,length) _Pre_ __deref __exceptthat __maybenull _Post_ __deref __exceptthat __maybenull
#define __deref_inout_xcount_full_opt(size) __deref_inout_xcount_full(size) _Pre_ __deref __exceptthat __maybenull _Post_ __deref __exceptthat __maybenull
#define __deref_opt_xcount(size) __deref_xcount(size) __exceptthat __maybenull
#define __deref_opt_in __deref_in __exceptthat __maybenull
#define __deref_opt_in_ecount(size) __deref_in_ecount(size) __exceptthat __maybenull
#define __deref_opt_in_bcount(size) __deref_in_bcount(size) __exceptthat __maybenull
#define __deref_opt_in_xcount(size) __deref_in_xcount(size) __exceptthat __maybenull
#define __deref_opt_out_xcount(size) __deref_out_xcount(size) __exceptthat __maybenull
#define __deref_opt_out_xcount_part(size,length) __deref_out_xcount_part(size,length) __exceptthat __maybenull
#define __deref_opt_out_xcount_full(size) __deref_out_xcount_full(size) __exceptthat __maybenull
#define __deref_opt_inout_xcount(size) __deref_inout_xcount(size) __exceptthat __maybenull
#define __deref_opt_inout_xcount_part(size,length) __deref_inout_xcount_part(size,length) __exceptthat __maybenull
#define __deref_opt_inout_xcount_full(size) __deref_inout_xcount_full(size) __exceptthat __maybenull
#define __deref_opt_xcount_opt(size) __deref_xcount_opt(size) __exceptthat __maybenull
#define __deref_opt_in_opt __deref_in_opt __exceptthat __maybenull
#define __deref_opt_in_ecount_opt(size) __deref_in_ecount_opt(size) __exceptthat __maybenull
#define __deref_opt_in_bcount_opt(size) __deref_in_bcount_opt(size) __exceptthat __maybenull
#define __deref_opt_in_xcount_opt(size) __deref_in_xcount_opt(size) __exceptthat __maybenull
#define __deref_opt_out_xcount_opt(size) __deref_out_xcount_opt(size) __exceptthat __maybenull
#define __deref_opt_out_xcount_part_opt(size,length) __deref_out_xcount_part_opt(size,length) __exceptthat __maybenull
#define __deref_opt_out_xcount_full_opt(size) __deref_out_xcount_full_opt(size) __exceptthat __maybenull
#define __deref_opt_inout_xcount_opt(size) __deref_inout_xcount_opt(size) __exceptthat __maybenull
#define __deref_opt_inout_xcount_part_opt(size,length) __deref_inout_xcount_part_opt(size,length) __exceptthat __maybenull
#define __deref_opt_inout_xcount_full_opt(size) __deref_inout_xcount_full_opt(size) __exceptthat __maybenull
#define __deref_in_ecount_iterator(size, incr) __inout _Pre_ __deref __elem_readableTo(size) __deref_out_range(==, _Old_(*_Curr_) + incr)
#define __deref_out_ecount_iterator(size, incr) __inout _Pre_ __deref __elem_writableTo(size) __deref_out_range(==, _Old_(*_Curr_) + incr)
#define __deref_inout_ecount_iterator(size, incr) __inout _Pre_ __deref __elem_readableTo(size) _Pre_ __deref __elem_writableTo(size) __deref_out_range(==, _Old_(*_Curr_) + incr)
#define __post_bcount(size) _Post_ __byte_writableTo(size)
#define __post_ecount(size) _Post_ __elem_writableTo(size)
#define __deref_realloc_bcount(insize, outsize) __inout _Pre_ __deref __byte_readableTo(insize) _Post_ __deref __byte_writableTo(outsize)
/* __in_ecount_or_z(c) specifies semantics like strncmp, where a string
* parameter is either null terminated, or valid up to c elements.
*/
#define __in_ecount_or_z(c) _When_(_String_length_(_Curr_) < (c), __in_z) \
_When_(_String_length_(_Curr_) >= (c), __in_ecount(c))
/* Provide default definition to be overridden when needed */
#define __post_nullnullterminated
/* Must protect redfinitions of macros to workaround rc.exe issues. */
#ifndef RC_INVOKED
#undef __nullnullterminated
#define __nullnullterminated __inexpressible_readableTo("string terminated by two nulls") __nullterminated
#undef __post_nullnullterminated
#define __post_nullnullterminated _Post_ __inexpressible_readableTo("string terminated by two nulls") _Post_ __nullterminated
#endif
#endif //__SAL_H_FULL_VER <= 140050727
/************************************************************************
New extensions to sal.h follow here.
*************************************************************************/
#if (_MSC_VER >= 1000) && !defined(__midl) && defined(_PREFAST_) #if (_MSC_VER >= 1000) && !defined(__midl) && defined(_PREFAST_)
#define __file_parser(typ) _SA_annotes2(SAL_file_parser,"function",typ)
#define __file_parser_class(typ) _SA_annotes2(SAL_file_parser,"class",typ)
#define __file_parser_library(typ) extern int _SA_annotes2(SAL_file_parser, "library", typ) __iSALFileParserLibrary##typ;
#define __source_code_content(typ) extern int _SA_annotes1(SAL_source_code_content, typ) __iSAL_Source_Code_Content##typ;
#define __class_code_content(typ) _SA_annotes1(SAL_class_code_content, typ)
#define __analysis_assert(e) __assume(e)
#define __analysis_hint(hint) _SA_annotes1(SAL_analysisHint, hint)
// For "breakpoint": doesn't return as far as analysis is concerned.
#define __analysis_noreturn __declspec(noreturn)
/* Internal defintions */
#define __inner_data_source(src_raw) _SA_annotes1(SAL_untrusted_data_source,src_raw) #define __inner_data_source(src_raw) _SA_annotes1(SAL_untrusted_data_source,src_raw)
#define __out_data_source(src_sym) _Post_ __inner_data_source(#src_sym) #define __inner_this_data_source(src_raw) _SA_annotes1(SAL_untrusted_data_source_this,src_raw)
#define __analysis_noreturn __declspec(noreturn) #define __inner_out_validated(typ_raw) _Post_ _SA_annotes1(SAL_validated,typ_raw)
#define __inner_this_out_validated(typ_raw) _SA_annotes1(SAL_validated_this,typ_raw)
#define __inner_assume_validated_dec __inline __nothrow void __AssumeValidated(__inner_out_validated("BY_DESIGN") const void *p) {p;}
#define __inner_assume_validated(p) __AssumeValidated(p)
#define __inner_transfer(formal) _SA_annotes1(SAL_transfer_adt_property_from,formal)
#define __inner_encoded _SA_annotes0(SAL_encoded)
#if defined(_MSC_EXTENSIONS) || defined(_PREFAST_) || defined(OACR)
#define __inner_adt_prop(adt,prop) _SA_annotes2(SAL_adt, adt,prop)
#define __inner_adt_add_prop(adt,prop) _SA_annotes2(SAL_add_adt_property,adt,prop)
#define __inner_adt_remove_prop(adt,prop) _SA_annotes2(SAL_remove_adt_property,adt,prop)
#define __inner_adt_transfer_prop(arg) _SA_annotes1(SAL_transfer_adt_property_from,arg)
#define __inner_adt_type_props(typ) _SA_annotes1(SAL_post_type,typ)
#define __inner_volatile _SA_annotes0(SAL_volatile)
#define __inner_nonvolatile _SA_annotes0(SAL_nonvolatile)
#define __inner_possibly_notnullterminated _SA_annotes1(SAL_nullTerminated,__maybe)
#define __inner_analysis_assume_nullterminated_dec __inline __nothrow void __AnalysisAssumeNullterminated(_Post_ __nullterminated void *p) {*(char*)p=0;}
#define __inner_analysis_assume_nullterminated(x) __AnalysisAssumeNullterminated(x);
#endif
#else #else
#define __out_data_source(src_sym) #define __file_parser(typ)
#define __file_parser_class(typ)
#define __file_parser_library(typ)
#define __source_code_content(typ)
#define __class_code_content(typ)
#define __analysis_assert(e)
#define __analysis_hint(hint)
#define __analysis_noreturn #define __analysis_noreturn
/* Internal defintions */
#define __inner_data_source(src_raw)
#define __inner_this_data_source(src_raw)
#define __inner_out_validated(typ_raw)
#define __inner_this_out_validated(typ_raw)
#define __inner_assume_validated_dec
#define __inner_assume_validated(p)
#define __inner_transfer(formal)
#define __inner_encoded
#define __inner_adt_prop(adt,prop)
#define __inner_adt_add_prop(adt,prop)
#define __inner_adt_remove_prop(adt,prop)
#define __inner_adt_transfer_prop(arg)
#define __inner_adt_type_props(typ)
#define __inner_volatile
#define __inner_nonvolatile
#define __inner_possibly_notnullterminated
#define __inner_analysis_assume_nullterminated_dec
#define __inner_analysis_assume_nullterminated(x)
#endif // #if (_MSC_VER >= 1000) && !defined(__midl) && defined(_PREFAST_)
#define __field_ecount(size) __notnull __elem_writableTo(size)
#define __field_bcount(size) __notnull __byte_writableTo(size)
#define __field_xcount(size) __notnull __inexpressible_writableTo(size)
#define __field_ecount_opt(size) __maybenull __elem_writableTo(size)
#define __field_bcount_opt(size) __maybenull __byte_writableTo(size)
#define __field_xcount_opt(size) __maybenull __inexpressible_writableTo(size)
#define __field_ecount_part(size,init) __notnull __elem_writableTo(size) __elem_readableTo(init)
#define __field_bcount_part(size,init) __notnull __byte_writableTo(size) __byte_readableTo(init)
#define __field_xcount_part(size,init) __notnull __inexpressible_writableTo(size) __inexpressible_readableTo(init)
#define __field_ecount_part_opt(size,init) __maybenull __elem_writableTo(size) __elem_readableTo(init)
#define __field_bcount_part_opt(size,init) __maybenull __byte_writableTo(size) __byte_readableTo(init)
#define __field_xcount_part_opt(size,init) __maybenull __inexpressible_writableTo(size) __inexpressible_readableTo(init)
#define __field_ecount_full(size) __field_ecount_part(size,size)
#define __field_bcount_full(size) __field_bcount_part(size,size)
#define __field_xcount_full(size) __field_xcount_part(size,size)
#define __field_ecount_full_opt(size) __field_ecount_part_opt(size,size)
#define __field_bcount_full_opt(size) __field_bcount_part_opt(size,size)
#define __field_xcount_full_opt(size) __field_xcount_part_opt(size,size)
#define __field_nullterminated __nullterminated
#define __struct_bcount(size) __byte_writableTo(size)
#define __struct_xcount(size) __inexpressible_writableTo(size)
#define __out_awcount(expr,size) _Pre_ __notnull \
__byte_writableTo((expr) ? (size) : (size) * 2) \
_Post_ __valid __refparam
#define __in_awcount(expr,size) _Pre_ __valid \
_Pre_ _Notref_ __deref __readonly \
__byte_readableTo((expr) ? (size) : (size) * 2)
#define __post_invalid _Post_ __notvalid
/* integer related macros */
#define __allocator __inner_allocator
#ifndef PAL_STDCPP_COMPAT
#define __deallocate(kind) _Pre_ __notnull __post_invalid
#define __deallocate_opt(kind) _Pre_ __maybenull __post_invalid
#endif #endif
#define __bound __inner_bound
#define __range(lb,ub) __inner_range(lb,ub)
#define __in_bound _Pre_ __inner_bound
#define __out_bound _Post_ __inner_bound
#define __deref_out_bound _Post_ __deref __inner_bound
#define __in_range(lb,ub) _Pre_ __inner_range(lb,ub)
#define __out_range(lb,ub) _Post_ __inner_range(lb,ub)
#define __deref_in_range(lb,ub) _Pre_ __deref __inner_range(lb,ub)
#define __deref_out_range(lb,ub) _Post_ __deref __inner_range(lb,ub)
#define __deref_inout_range(lb,ub) __deref_in_range(lb,ub) __deref_out_range(lb,ub)
#define __field_range(lb,ub) __range(lb,ub)
#define __field_data_source(src_sym) __inner_data_source(#src_sym)
#if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN) #define __range_max(a,b) __range(==, a > b ? a : b)
#define _Check_return_opt_ _Check_return_ #define __range_min(a,b) __range(==, a < b ? a : b)
/* Penetration review macros */
#define __in_data_source(src_sym) _Pre_ __inner_data_source(#src_sym)
#define __out_data_source(src_sym) _Post_ __inner_data_source(#src_sym)
#define __out_validated(typ_sym) __inner_out_validated(#typ_sym)
#define __this_out_data_source(src_sym) __inner_this_data_source(#src_sym)
#define __this_out_validated(typ_sym) __inner_this_out_validated(#typ_sym)
#define __transfer(formal) _Post_ __inner_transfer(formal)
#define __rpc_entry __inner_control_entrypoint(RPC)
#define __kernel_entry __inner_control_entrypoint(UserToKernel)
#define __gdi_entry __inner_control_entrypoint(GDI)
#define __encoded_pointer __inner_encoded
#define __encoded_array __inner_encoded
#define __field_encoded_pointer __inner_encoded
#define __field_encoded_array __inner_encoded
#if defined(_MSC_EXTENSIONS) || defined(_PREFAST_) || defined(OACR)
#define __type_has_adt_prop(adt,prop) __inner_adt_prop(adt,prop)
#define __out_has_adt_prop(adt,prop) _Post_ __inner_adt_add_prop(adt,prop)
#define __out_not_has_adt_prop(adt,prop) _Post_ __inner_adt_remove_prop(adt,prop)
#define __out_transfer_adt_prop(arg) _Post_ __inner_adt_transfer_prop(arg)
#define __out_has_type_adt_props(typ) _Post_ __inner_adt_type_props(typ)
/* useful PFD related macros */
#define __possibly_notnullterminated __inner_possibly_notnullterminated
/* Windows Internal */
#define __volatile __inner_volatile
#define __nonvolatile __inner_nonvolatile
#else #else
#define _Check_return_opt_ #define __out_has_type_adt_props(typ) /* nothing */
#endif
#define __deref_volatile __deref __volatile
#define __deref_nonvolatile __deref __nonvolatile
/* declare stub functions for macros */
__inner_assume_validated_dec
__inner_assume_bound_dec
__inner_analysis_assume_nullterminated_dec
#define __analysis_assume_nullterminated(x) __inner_analysis_assume_nullterminated(x)
#define __assume_validated(p) __inner_assume_validated(p)
#define __assume_bound(i) __inner_assume_bound(i)
/**************************************************************************
* SAL 2 extensions for Windows-specific APIs.
***************************************************************************/
// Annotation for parameters that are not used in any way by the function.
// Unlike _Reserved_, an _Unreferenced_parameter_ pointer need not be NULL.
#ifndef _Unreferenced_parameter_
#define _Unreferenced_parameter_ _Const_
#endif #endif
#if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN_WAT) // Pointer parameters that are freed by the function, and thus the pointed-to
#define _Check_return_wat_ _Check_return_ // memory should not be used after return.
#else #ifndef _Frees_ptr_
#define _Check_return_wat_ #define _Frees_ptr_ _Pre_notnull_ _Post_ptr_invalid_
#endif #endif
#ifndef _Frees_ptr_opt_
#define _Frees_ptr_opt_ _Pre_maybenull_ _Post_ptr_invalid_
#endif
// NLS APIs allow strings to be specified either by an element count or
// null termination. Unlike _In_reads_or_z_, this is not whichever comes
// first, but based on whether the size is negative or not.
#define _In_NLS_string_(size) _When_((size) < 0, _In_z_) \
_When_((size) >= 0, _In_reads_(size))
// Minifilter CompletionContext parameters on the pre-operation callback
// default to NULL. For return type FLT_PREOP_SUCCESS_WITH_CALLBACK or
// FLT_PREOP_SYNCHRONIZE, it may be set to NULL or a valid pointer. For all
// other returns, it must be NULL.
#define _Flt_CompletionContext_Outptr_ \
_Outptr_result_maybenull_ _Pre_valid_ \
_At_(*_Curr_, _Pre_null_ \
_When_(return != FLT_PREOP_SUCCESS_WITH_CALLBACK && return != FLT_PREOP_SYNCHRONIZE, _Post_null_))
// Minifilter ConnectionCookie parameters on the port connect notify callback
// default to NULL. On successful return, it may be set to NULL or non-NULL,
// but it must be NULL on failure.
#define _Flt_ConnectionCookie_Outptr_ \
_Outptr_result_maybenull_ _Pre_valid_ \
_At_(*_Curr_, _Pre_null_ _On_failure_(_Post_null_))
//
// A common pattern is to pass an "_Inout_ PCHAR* ppBuf" of size "_Inout_ DWORD* pSize"
// to a function that writes to **pBuf, incrementing *ppBuf to point to one
// past the last written byte. Thus the length of the write is
// (*ppBuf - Old(*ppBuf)). The size of the remaining unwritten capacity
// is written to *pSize.
//
// This pattern is frequently used when progressively filling a
// large buffer in chunks
// (e.g. when reading from a network interface in a driver).
//
// It is expected that these supplementary annotations would be used inside an
// _At_, like so:
//
// _At_(*ppBuf, _Writes_and_advances_ptr_(*pBufSize))
// HRESULT WriteChunkOfData(_Inout_ PCHAR* ppBuf, _Inout_ DWORD* pBufSize);
//
#ifndef _Writes_and_advances_ptr_
#define _Writes_and_advances_ptr_(size) \
_At_((void*)_Curr_, _Inout_) \
_At_(_Curr_, \
_Pre_writable_size_(size) \
_Post_writable_size_(size) \
_Post_satisfies_(_Curr_ - _Old_(_Curr_) == size)) \
_At_(_Old_(_Curr_), \
_Post_readable_size_(_Old_(size) - size))
#endif
#ifndef _Writes_bytes_and_advances_ptr_
#define _Writes_bytes_and_advances_ptr_(size) \
_At_((void*)_Curr_, _Inout_) \
_At_(_Curr_, \
_Pre_writable_byte_size_(size) \
_Post_writable_byte_size_(size) \
_Post_satisfies_(((char*)_Curr_) - ((void*)_Old_(_Curr_)) == size)) \
_At_(_Old_(_Curr_), \
_Post_readable_byte_size_(_Old_(size) - size))
#endif
//
// Gets the current error code (as returned by GetLastError()), and stores
// in _Curr_ as a postcondition. This is currently approximated by assuming
// that GetLastError() always returns a failed error code. This is not a
// completely accurate approximation, but reasonable.
//
#define _Post_equals_last_error_ _Post_satisfies_(_Curr_ != 0)
#ifdef __cplusplus
}
#endif
#ifdef _PREFIX_
/**************************************************************************
* Defintion of __pfx_assume and __pfx_assert. Thse should be the only
* defintions of these functions.
***************************************************************************/
#if __cplusplus
extern "C" void __pfx_assert(bool, const char *);
extern "C" void __pfx_assume(bool, const char *);
#else
void __pfx_assert(int, const char *);
void __pfx_assume(int, const char *);
#endif
/**************************************************************************
* Redefintion of __analysis_assume and __analysis_assert for PREFIX build
**************************************************************************/
#undef __analysis_assume
#undef __analysis_assert
#define __analysis_assume(e) (__pfx_assume(e,"pfx_assume"),__assume(e));
#define __analysis_assert(e) (__pfx_assert(e,"pfx_assert"),__assume(e));
#endif /* ifdef _PREFIX_ */
/**************************************************************************
* This include should always be the last thing in this file.
* Must avoid redfinitions of macros to workaround rc.exe issues.
***************************************************************************/
#if !(defined(RC_INVOKED) || defined(SORTPP_PASS))
#include <specstrings_strict.h>
#endif /* if !(defined(RC_INVOKED) || defined(SORTPP_PASS)) */
/*
If no SAL 2 appears to have been defined (_Outptr_ is a representative choice)
then we must be operating in a downlevel build environment (such as VS10).
We also test against the compiler version to identify a downlevel environment,
as VS11 is the minimum required for SAL 2 support.
If we are operating in a downlevel build environment (such as VS10)
we need to undefine the following symbols before including driverspecs.h
or we will end up referencing SAL 2 implementation symbols and cause
build failures.
*/
#if (!defined(_Outptr_) || _MSC_VER <= 1600) && !( defined( MIDL_PASS ) || defined(__midl) || defined(RC_INVOKED) ) /*IFSTRIP=IGN*/
#undef __ANNOTATION
#define __ANNOTATION(fun) /* fun */
#undef __PRIMOP
#define __PRIMOP(type, fun)
#endif /* !defined(_Outptr_) || _MSC_VER <= 1600 */
// ROTOR doesn't need driverspecs.h
// #include <driverspecs.h>
/*
If no SAL 2 appears to have been defined (_Outptr_ is a representative choice)
then we must be operating in a downlevel build environment (such as VS10).
We also test against the compiler version to identify a downlevel environment,
as VS11 is the minimum required for SAL 2 support.
If we are in a downlevel environment, we can go ahead and include no_sal2.h
to make all of SAL 2 no-ops to ensure no build failures.
*/
#if (!defined(_Outptr_) /* || _MSC_VER <= 1600 */) && !( defined( MIDL_PASS ) || defined(__midl) || defined(RC_INVOKED) ) && !( defined( _SDV_ ) ) /*IFSTRIP=IGN*/
#include <no_sal2.h>
#endif /* !defined(_Outptr_) || _MSC_VER <= 1600 */
#endif /* #ifndef SPECSTRINGS_H */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,491 @@
/*
* PROJECT: ReactOS PSDK
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Undefines SAL definitions
* COPYRIGHT: Copyright 2020 Timo Kreuzer <timo.kreuzer@reactos.org>
*/
#pragma once
#undef __ecount
#undef __bcount
#undef __xcount
#undef __in
#undef __in_ecount
#undef __in_bcount
#undef __in_xcount
#undef __in_z
#undef __in_ecount_z
#undef __in_bcount_z
#undef __out
#undef __out_ecount
#undef __out_bcount
#undef __out_xcount
#undef __out_ecount_part
#undef __out_bcount_part
#undef __out_xcount_part
#undef __out_ecount_full
#undef __out_bcount_full
#undef __out_xcount_full
#undef __out_z
#undef __out_ecount_z
#undef __out_bcount_z
#undef __inout
#undef __inout_ecount
#undef __inout_bcount
#undef __inout_xcount
#undef __inout_ecount_part
#undef __inout_bcount_part
#undef __inout_xcount_part
#undef __inout_ecount_full
#undef __inout_bcount_full
#undef __inout_xcount_full
#undef __inout_z
#undef __inout_ecount_z
#undef __inout_bcount_z
#undef __ecount_opt
#undef __bcount_opt
#undef __xcount_opt
#undef __in_opt
#undef __in_ecount_opt
#undef __in_bcount_opt
#undef __in_z_opt
#undef __in_ecount_z_opt
#undef __in_bcount_z_opt
#undef __in_xcount_opt
#undef __out_opt
#undef __out_ecount_opt
#undef __out_bcount_opt
#undef __out_xcount_opt
#undef __out_ecount_part_opt
#undef __out_bcount_part_opt
#undef __out_xcount_part_opt
#undef __out_ecount_full_opt
#undef __out_bcount_full_opt
#undef __out_xcount_full_opt
#undef __out_ecount_z_opt
#undef __out_bcount_z_opt
#undef __inout_opt
#undef __inout_ecount_opt
#undef __inout_bcount_opt
#undef __inout_xcount_opt
#undef __inout_ecount_part_opt
#undef __inout_bcount_part_opt
#undef __inout_xcount_part_opt
#undef __inout_ecount_full_opt
#undef __inout_bcount_full_opt
#undef __inout_xcount_full_opt
#undef __inout_z_opt
#undef __inout_ecount_z_opt
#undef __inout_ecount_z_opt
#undef __inout_bcount_z_opt
#undef __deref_ecount
#undef __deref_bcount
#undef __deref_xcount
#undef __deref_in
#undef __deref_in_ecount
#undef __deref_in_bcount
#undef __deref_in_xcount
#undef __deref_out
#undef __deref_out_ecount
#undef __deref_out_bcount
#undef __deref_out_xcount
#undef __deref_out_ecount_part
#undef __deref_out_bcount_part
#undef __deref_out_xcount_part
#undef __deref_out_ecount_full
#undef __deref_out_bcount_full
#undef __deref_out_xcount_full
#undef __deref_out_z
#undef __deref_out_ecount_z
#undef __deref_out_bcount_z
#undef __deref_inout
#undef __deref_inout_ecount
#undef __deref_inout_bcount
#undef __deref_inout_xcount
#undef __deref_inout_ecount_part
#undef __deref_inout_bcount_part
#undef __deref_inout_xcount_part
#undef __deref_inout_ecount_full
#undef __deref_inout_bcount_full
#undef __deref_inout_xcount_full
#undef __deref_inout_z
#undef __deref_inout_ecount_z
#undef __deref_inout_bcount_z
#undef __deref_ecount_opt
#undef __deref_bcount_opt
#undef __deref_xcount_opt
#undef __deref_in_opt
#undef __deref_in_opt_out
#undef __deref_in_ecount_opt
#undef __deref_in_bcount_opt
#undef __deref_in_xcount_opt
#undef __deref_out_opt
#undef __deref_out_ecount_opt
#undef __deref_out_bcount_opt
#undef __deref_out_xcount_opt
#undef __deref_out_ecount_part_opt
#undef __deref_out_bcount_part_opt
#undef __deref_out_xcount_part_opt
#undef __deref_out_ecount_full_opt
#undef __deref_out_bcount_full_opt
#undef __deref_out_xcount_full_opt
#undef __deref_out_z_opt
#undef __deref_out_ecount_z_opt
#undef __deref_out_bcount_z_opt
#undef __deref_inout_opt
#undef __deref_inout_ecount_opt
#undef __deref_inout_bcount_opt
#undef __deref_inout_xcount_opt
#undef __deref_inout_ecount_part_opt
#undef __deref_inout_bcount_part_opt
#undef __deref_inout_xcount_part_opt
#undef __deref_inout_ecount_full_opt
#undef __deref_inout_bcount_full_opt
#undef __deref_inout_xcount_full_opt
#undef __deref_inout_z_opt
#undef __deref_inout_ecount_z_opt
#undef __deref_inout_bcount_z_opt
#undef __deref_opt_ecount
#undef __deref_opt_bcount
#undef __deref_opt_xcount
#undef __deref_opt_in
#undef __deref_opt_in_ecount
#undef __deref_opt_in_bcount
#undef __deref_opt_in_xcount
#undef __deref_opt_out
#undef __deref_opt_out_ecount
#undef __deref_opt_out_bcount
#undef __deref_opt_out_xcount
#undef __deref_opt_out_ecount_part
#undef __deref_opt_out_bcount_part
#undef __deref_opt_out_xcount_part
#undef __deref_opt_out_ecount_full
#undef __deref_opt_out_bcount_full
#undef __deref_opt_out_xcount_full
#undef __deref_opt_inout
#undef __deref_opt_inout_ecount
#undef __deref_opt_inout_bcount
#undef __deref_opt_inout_xcount
#undef __deref_opt_inout_ecount_part
#undef __deref_opt_inout_bcount_part
#undef __deref_opt_inout_xcount_part
#undef __deref_opt_inout_ecount_full
#undef __deref_opt_inout_bcount_full
#undef __deref_opt_inout_xcount_full
#undef __deref_opt_inout_z
#undef __deref_opt_inout_ecount_z
#undef __deref_opt_inout_bcount_z
#undef __deref_opt_ecount_opt
#undef __deref_opt_bcount_opt
#undef __deref_opt_xcount_opt
#undef __deref_opt_in_opt
#undef __deref_opt_in_ecount_opt
#undef __deref_opt_in_bcount_opt
#undef __deref_opt_in_xcount_opt
#undef __deref_opt_out_opt
#undef __deref_opt_out_ecount_opt
#undef __deref_opt_out_bcount_opt
#undef __deref_opt_out_xcount_opt
#undef __deref_opt_out_ecount_part_opt
#undef __deref_opt_out_bcount_part_opt
#undef __deref_opt_out_xcount_part_opt
#undef __deref_opt_out_ecount_full_opt
#undef __deref_opt_out_bcount_full_opt
#undef __deref_opt_out_xcount_full_opt
#undef __deref_opt_out_z_opt
#undef __deref_opt_out_ecount_z_opt
#undef __deref_opt_out_bcount_z_opt
#undef __deref_opt_inout_opt
#undef __deref_opt_inout_ecount_opt
#undef __deref_opt_inout_bcount_opt
#undef __deref_opt_inout_xcount_opt
#undef __deref_opt_inout_ecount_part_opt
#undef __deref_opt_inout_bcount_part_opt
#undef __deref_opt_inout_xcount_part_opt
#undef __deref_opt_inout_ecount_full_opt
#undef __deref_opt_inout_bcount_full_opt
#undef __deref_opt_inout_xcount_full_opt
#undef __deref_opt_inout_z_opt
#undef __deref_opt_inout_ecount_z_opt
#undef __deref_opt_inout_bcount_z_opt
#undef __deref_in_ecount_iterator
#undef __deref_out_ecount_iterator
#undef __deref_inout_ecount_iterator
#undef __deref_realloc_bcount
/************************************************************************
* SAL 2 _Ouptr_ family of annotations
************************************************************************/
#undef _Outptr_
#undef _Outptr_result_maybenull_
#undef _Outptr_opt_
#undef _Outptr_opt_result_maybenull_
#undef _Outptr_result_z_
#undef _Outptr_opt_result_z_
#undef _Outptr_result_maybenull_z_
#undef _Outptr_opt_result_maybenull_z_
#undef _Outptr_result_nullonfailure_
#undef _Outptr_opt_result_nullonfailure_
#undef _COM_Outptr_
#undef _COM_Outptr_result_maybenull_
#undef _COM_Outptr_opt_
#undef _COM_Outptr_opt_result_maybenull_
#undef _Outptr_result_buffer_
#undef _Outptr_opt_result_buffer_
#undef _Outptr_result_buffer_to_
#undef _Outptr_opt_result_buffer_to_
#undef _Outptr_result_buffer_all_
#undef _Outptr_opt_result_buffer_all_
#undef _Outptr_result_buffer_maybenull_
#undef _Outptr_opt_result_buffer_maybenull_
#undef _Outptr_result_buffer_to_maybenull_
#undef _Outptr_opt_result_buffer_to_maybenull_
#undef _Outptr_result_buffer_all_maybenull_
#undef _Outptr_opt_result_buffer_all_maybenull_
#undef _Outptr_result_bytebuffer_
#undef _Outptr_opt_result_bytebuffer_
#undef _Outptr_result_bytebuffer_to_
#undef _Outptr_opt_result_bytebuffer_to_
#undef _Outptr_result_bytebuffer_all_
#undef _Outptr_opt_result_bytebuffer_all_
#undef _Outptr_result_bytebuffer_maybenull_
#undef _Outptr_opt_result_bytebuffer_maybenull_
#undef _Outptr_result_bytebuffer_to_maybenull_
#undef _Outptr_opt_result_bytebuffer_to_maybenull_
#undef _Outptr_result_bytebuffer_all_maybenull_
#undef _Outptr_opt_result_bytebuffer_all_maybenull_
/************************************************************************
* Orcas SAL
************************************************************************/
#undef _Deref_out_
#undef _Deref_out_opt_
#undef _Deref_opt_out_
#undef _Deref_opt_out_opt_
#undef _In_count_
#undef _In_opt_count_
#undef _In_bytecount_
#undef _In_opt_bytecount_
#undef _Out_cap_
#undef _Out_opt_cap_
#undef _Out_bytecap_
#undef _Out_opt_bytecap_
#undef _Deref_post_count_
#undef _Deref_post_opt_count_
#undef _Deref_post_bytecount_
#undef _Deref_post_opt_bytecount_
#undef _Deref_post_cap_
#undef _Deref_post_opt_cap_
#undef _Deref_post_bytecap_
#undef _Deref_post_opt_bytecap_
/************************************************************************
* Advanced Annotations
************************************************************************/
#undef _At_
#undef _When_
#undef __success
#undef __out_awcount
#undef __in_awcount
#undef __nullterminated
#undef __nullnullterminated
#undef __reserved
#undef __checkReturn
#undef __typefix
#undef __override
#undef __callback
#undef __format_string
#undef __blocksOn
#undef __fallthrough
#undef __range
#undef __in_range
#undef __out_range
#undef __deref_in_range
#undef __deref_out_range
#undef __deref_inout_range
#undef __field_range
#undef __range_max
#undef __range_min
#undef __bound
#undef __in_bound
#undef __out_bound
#undef __deref_out_bound
#undef __assume_bound
#undef __analysis_assume_nullterminated
#undef __allocator
#undef __deallocate
#undef __deallocate_opt
#undef __post_invalid
#undef __post_nullnullterminated
/***************************************************************************
* Expert Macros
***************************************************************************/
#undef __null
#undef __notnull
#undef __maybenull
#undef __exceptthat
/***************************************************************************
* Macros to classify fields of structures.
****************************************************************************/
#undef __field_ecount
#undef __field_bcount
#undef __field_xcount
#undef __field_ecount_opt
#undef __field_bcount_opt
#undef __field_xcount_opt
#undef __field_ecount_part
#undef __field_bcount_part
#undef __field_xcount_part
#undef __field_ecount_part_opt
#undef __field_bcount_part_opt
#undef __field_xcount_part_opt
#undef __field_ecount_full
#undef __field_bcount_full
#undef __field_xcount_full
#undef __field_ecount_full_opt
#undef __field_bcount_full_opt
#undef __field_xcount_full_opt
#undef __field_nullterminated
#undef __struct_bcount
#undef __struct_xcount
/***************************************************************************
* Macros to classify the entrypoints and indicate their category.
***************************************************************************/
#undef __control_entrypoint
#undef __rpc_entry
#undef __kernel_entry
#undef __gdi_entry
/***************************************************************************
* Macros to track untrusted data and their validation.
***************************************************************************/
#undef __in_data_source
#undef __out_data_source
#undef __field_data_source
#undef __this_out_data_source
/**************************************************************************
* Macros to tag file parsing code.
**************************************************************************/
#undef __out_validated
#undef __this_out_validated
#undef __file_parser
#undef __file_parser_class
#undef __file_parser_library
/***************************************************************************
* Macros to track the code content in the file.
***************************************************************************/
#undef __source_code_content
/***************************************************************************
* Macros to track the code content in the class.
***************************************************************************/
#undef __class_code_content
/*************************************************************************
* Macros to tag encoded function pointers
**************************************************************************/
#undef __encoded_pointer
#undef __encoded_array
#undef __field_encoded_pointer
#undef __field_encoded_array
#undef __transfer
#undef __assume_validated
/*************************************************************************
* __analysis_assume
*************************************************************************/
#undef __analysis_assume
#undef __analysis_assert
/*************************************************************************
* __analysis_hint
*************************************************************************/
#undef __analysis_hint
/*************************************************************************
* Macros to encode abstract properties of values. Used by SALadt.h
*************************************************************************/
#undef __type_has_adt_prop
#undef __out_has_adt_prop
#undef __out_not_has_adt_prop
#undef __out_transfer_adt_prop
#undef __out_has_type_adt_props
/*************************************************************************
* Macros used by Prefast for Drivers
*************************************************************************/
#undef __possibly_notnullterminated
/*************************************************************************
* Advanced macros
*************************************************************************/
#undef __volatile
#undef __deref_volatile
#undef __nonvolatile
#undef __deref_nonvolatile
/*************************************************************************
* Macros deprecated with strict level greater then 1.
**************************************************************************/
#undef __in_nz
#undef __in_ecount_nz
#undef __in_bcount_nz
#undef __out_nz
#undef __out_nz_opt
#undef __out_ecount_nz
#undef __out_bcount_nz
#undef __inout_nz
#undef __inout_ecount_nz
#undef __inout_bcount_nz
#undef __in_nz_opt
#undef __in_ecount_nz_opt
#undef __in_bcount_nz_opt
#undef __out_ecount_nz_opt
#undef __out_bcount_nz_opt
#undef __inout_nz_opt
#undef __inout_ecount_nz_opt
#undef __inout_bcount_nz_opt
#undef __deref_out_nz
#undef __deref_out_ecount_nz
#undef __deref_out_bcount_nz
#undef __deref_inout_nz
#undef __deref_inout_ecount_nz
#undef __deref_inout_bcount_nz
#undef __deref_out_nz_opt
#undef __deref_out_ecount_nz_opt
#undef __deref_out_bcount_nz_opt
#undef __deref_inout_nz_opt
#undef __deref_inout_ecount_nz_opt
#undef __deref_inout_bcount_nz_opt
#undef __deref_opt_inout_nz
#undef __deref_opt_inout_ecount_nz
#undef __deref_opt_inout_bcount_nz
#undef __deref_opt_out_nz_opt
#undef __deref_opt_out_ecount_nz_opt
#undef __deref_opt_out_bcount_nz_opt
#undef __deref_opt_inout_nz_opt
#undef __deref_opt_inout_ecount_nz_opt
#undef __deref_opt_inout_bcount_nz_opt
#undef __deref
#undef __pre
#undef __post
#undef __readableTo
#undef __writableTo
#undef __maybevalid
#undef __inexpressible_readableTo
#undef __data_entrypoint
#undef __readonly
#undef __byte_writableTo
#undef __byte_readableTo
#undef __elem_readableTo
#undef __elem_writableTo
#undef __valid
#undef __notvalid
#undef __refparam
#undef __precond