14 #define _CRT_PACKING 8
15 #pragma pack(push, _CRT_PACKING)
25 #ifndef _UINTPTR_T_DEFINED
26 #define _UINTPTR_T_DEFINED
34 #ifndef _VA_LIST_DEFINED
35 #define _VA_LIST_DEFINED
37 typedef System::ArgIterator
va_list;
44 #define _ADDRESSOF(v) (&const_cast<char&>(reinterpret_cast<const volatile char&>(v)))
46 #define _ADDRESSOF(v) (&(v))
49 #if defined _M_ARM && !defined _M_CEE_PURE
51 #define _SLOTSIZEOF(t) ((sizeof(t) + _VA_ALIGN - 1) & ~(_VA_ALIGN - 1))
52 #define _APALIGN(t,ap) (((va_list)0 - (ap)) & (__alignof(t) - 1))
53 #elif defined _M_ARM64 && !defined _M_CEE_PURE
55 #define _SLOTSIZEOF(t) ((sizeof(t) + _VA_ALIGN - 1) & ~(_VA_ALIGN - 1))
56 #define _APALIGN(t,ap) (((va_list)0 - (ap)) & (__alignof(t) - 1))
58 #define _SLOTSIZEOF(t) (sizeof(t))
59 #define _APALIGN(t,ap) (__alignof(t))
62 #if defined _M_CEE_PURE || (defined _M_CEE && !defined _M_ARM && !defined _M_ARM64)
64 void __cdecl __va_start(va_list*, ...);
65 void* __cdecl __va_arg(va_list*, ...);
66 void __cdecl __va_end(va_list*);
68 #define __crt_va_start_a(ap, v) ((void)(__va_start(&ap, _ADDRESSOF(v), _SLOTSIZEOF(v), __alignof(v), _ADDRESSOF(v))))
69 #define __crt_va_arg(ap, t) (*(t *)__va_arg(&ap, _SLOTSIZEOF(t), _APALIGN(t,ap), (t*)0))
70 #define __crt_va_end(ap) ((void)(__va_end(&ap)))
74 #define _INTSIZEOF(n) ((sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1))
76 #define __crt_va_start_a(ap, v) ((void)(ap = (va_list)_ADDRESSOF(v) + _INTSIZEOF(v)))
77 #define __crt_va_arg(ap, t) (*(t*)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)))
78 #define __crt_va_end(ap) ((void)(ap = (va_list)0))
83 void __cdecl __va_start(va_list*, ...);
84 #define __crt_va_start_a(ap, v) ((void)(__va_start(&ap, _ADDRESSOF(v), _SLOTSIZEOF(v), _ADDRESSOF(v))))
86 #define __crt_va_start_a(ap, v) ((void)(ap = (va_list)_ADDRESSOF(v) + _SLOTSIZEOF(v)))
89 #define __crt_va_arg(ap, t) (*(t*)((ap += _SLOTSIZEOF(t) + _APALIGN(t,ap)) - _SLOTSIZEOF(t)))
90 #define __crt_va_end(ap) ((void)(ap = (va_list)0))
92 #elif defined _M_ARM64
94 void __cdecl __va_start(va_list*, ...);
96 #define __crt_va_start_a(ap,v) ((void)(__va_start(&ap, _ADDRESSOF(v), _SLOTSIZEOF(v), __alignof(v), _ADDRESSOF(v))))
97 #define __crt_va_arg(ap, t) \
98 ((sizeof(t) > (2 * sizeof(__int64))) \
99 ? **(t**)((ap += sizeof(__int64)) - sizeof(__int64)) \
100 : *(t*)((ap += _SLOTSIZEOF(t) + _APALIGN(t,ap)) - _SLOTSIZEOF(t)))
101 #define __crt_va_end(ap) ((void)(ap = (va_list)0))
106 void __cdecl __va_start(va_list* , ...);
108 #define __crt_va_start_a(ap, x) ((void)(__va_start(&ap, x)))
109 #define __crt_va_arg(ap, t) \
110 ((sizeof(t) > sizeof(__int64) || (sizeof(t) & (sizeof(t) - 1)) != 0) \
111 ? **(t**)((ap += sizeof(__int64)) - sizeof(__int64)) \
112 : *(t* )((ap += sizeof(__int64)) - sizeof(__int64)))
113 #define __crt_va_end(ap) ((void)(ap = (va_list)0))
121 #if defined __cplusplus && !defined _CRT_NO_VA_START_VALIDATION
124 template <
typename _Ty>
125 struct __vcrt_va_list_is_reference
127 enum :
bool { __the_value =
false };
130 template <
typename _Ty>
131 struct __vcrt_va_list_is_reference<_Ty&>
133 enum :
bool { __the_value =
true };
136 template <
typename _Ty>
137 struct __vcrt_va_list_is_reference<_Ty&&>
139 enum :
bool { __the_value =
true };
142 template <
typename _Ty>
143 void __vcrt_va_start_verify_argument_type() throw()
145 static_assert(!__vcrt_va_list_is_reference<_Ty>::__the_value,
"va_start argument must not have reference type and must not be parenthesized");
149 #define __crt_va_start(ap, x) ((void)(__vcrt_va_start_verify_argument_type<decltype(x)>(), __crt_va_start_a(ap, x)))
151 #else // ^^^ __cplusplus ^^^ // vvv !__cplusplus vvv //
153 #define __crt_va_start(ap, x) __crt_va_start_a(ap, x)
unsigned int uintptr_t
Definition: vadefs.h:30
char * va_list
Definition: vadefs.h:39