| 1 |
/** |
| 2 |
* This file has no copyright assigned and is placed in the Public Domain. |
| 3 |
* This file is part of the mingw-w64 runtime package. |
| 4 |
* No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef _INC_CORECRT |
| 8 |
#define _INC_CORECRT |
| 9 |
|
| 10 |
#include <_mingw.h> |
| 11 |
|
| 12 |
#ifndef __WIDL__ |
| 13 |
#undef _CRT_PACKING |
| 14 |
#define _CRT_PACKING 8 |
| 15 |
#pragma pack(push,_CRT_PACKING) |
| 16 |
#endif |
| 17 |
|
| 18 |
#ifdef __ERRCODE_DEFINED_MS |
| 19 |
/* #define __ERRCODE_DEFINED_MS */ |
| 20 |
typedef int errcode; |
| 21 |
#endif |
| 22 |
|
| 23 |
#ifndef _CRTNOALIAS |
| 24 |
#define _CRTNOALIAS |
| 25 |
#endif |
| 26 |
|
| 27 |
#ifndef _CRTRESTRICT |
| 28 |
#define _CRTRESTRICT |
| 29 |
#endif |
| 30 |
|
| 31 |
#ifndef _SIZE_T_DEFINED |
| 32 |
#define _SIZE_T_DEFINED |
| 33 |
#undef size_t |
| 34 |
#ifdef _WIN64 |
| 35 |
__MINGW_EXTENSION typedef unsigned __int64 size_t; |
| 36 |
#else |
| 37 |
typedef unsigned int size_t; |
| 38 |
#endif /* _WIN64 */ |
| 39 |
#endif /* _SIZE_T_DEFINED */ |
| 40 |
|
| 41 |
#ifndef _SSIZE_T_DEFINED |
| 42 |
#define _SSIZE_T_DEFINED |
| 43 |
#undef ssize_t |
| 44 |
#ifdef _WIN64 |
| 45 |
__MINGW_EXTENSION typedef __int64 ssize_t; |
| 46 |
#else |
| 47 |
typedef int ssize_t; |
| 48 |
#endif /* _WIN64 */ |
| 49 |
#endif /* _SSIZE_T_DEFINED */ |
| 50 |
|
| 51 |
#ifndef _RSIZE_T_DEFINED |
| 52 |
typedef size_t rsize_t; |
| 53 |
#define _RSIZE_T_DEFINED |
| 54 |
#endif |
| 55 |
|
| 56 |
#ifndef _INTPTR_T_DEFINED |
| 57 |
#define _INTPTR_T_DEFINED |
| 58 |
#ifndef __intptr_t_defined |
| 59 |
#define __intptr_t_defined |
| 60 |
#undef intptr_t |
| 61 |
#ifdef _WIN64 |
| 62 |
__MINGW_EXTENSION typedef __int64 intptr_t; |
| 63 |
#else |
| 64 |
typedef int intptr_t; |
| 65 |
#endif /* _WIN64 */ |
| 66 |
#endif /* __intptr_t_defined */ |
| 67 |
#endif /* _INTPTR_T_DEFINED */ |
| 68 |
|
| 69 |
#ifndef _UINTPTR_T_DEFINED |
| 70 |
#define _UINTPTR_T_DEFINED |
| 71 |
#ifndef __uintptr_t_defined |
| 72 |
#define __uintptr_t_defined |
| 73 |
#undef uintptr_t |
| 74 |
#ifdef _WIN64 |
| 75 |
__MINGW_EXTENSION typedef unsigned __int64 uintptr_t; |
| 76 |
#else |
| 77 |
typedef unsigned int uintptr_t; |
| 78 |
#endif /* _WIN64 */ |
| 79 |
#endif /* __uintptr_t_defined */ |
| 80 |
#endif /* _UINTPTR_T_DEFINED */ |
| 81 |
|
| 82 |
#ifndef _PTRDIFF_T_DEFINED |
| 83 |
#define _PTRDIFF_T_DEFINED |
| 84 |
#ifndef _PTRDIFF_T_ |
| 85 |
#define _PTRDIFF_T_ |
| 86 |
#undef ptrdiff_t |
| 87 |
#ifdef _WIN64 |
| 88 |
__MINGW_EXTENSION typedef __int64 ptrdiff_t; |
| 89 |
#else |
| 90 |
typedef int ptrdiff_t; |
| 91 |
#endif /* _WIN64 */ |
| 92 |
#endif /* _PTRDIFF_T_ */ |
| 93 |
#endif /* _PTRDIFF_T_DEFINED */ |
| 94 |
|
| 95 |
#ifndef _WCHAR_T_DEFINED |
| 96 |
#define _WCHAR_T_DEFINED |
| 97 |
#if !defined(__cplusplus) && !defined(__WIDL__) |
| 98 |
typedef unsigned short wchar_t; |
| 99 |
#endif /* C++ */ |
| 100 |
#endif /* _WCHAR_T_DEFINED */ |
| 101 |
|
| 102 |
#ifndef _WCTYPE_T_DEFINED |
| 103 |
#define _WCTYPE_T_DEFINED |
| 104 |
#ifndef _WINT_T |
| 105 |
#define _WINT_T |
| 106 |
typedef unsigned short wint_t; |
| 107 |
typedef unsigned short wctype_t; |
| 108 |
#endif /* _WINT_T */ |
| 109 |
#endif /* _WCTYPE_T_DEFINED */ |
| 110 |
|
| 111 |
#ifndef _ERRCODE_DEFINED |
| 112 |
#define _ERRCODE_DEFINED |
| 113 |
typedef int errno_t; |
| 114 |
#endif |
| 115 |
|
| 116 |
#ifndef _TIME32_T_DEFINED |
| 117 |
#define _TIME32_T_DEFINED |
| 118 |
typedef long __time32_t; |
| 119 |
#endif |
| 120 |
|
| 121 |
#ifndef _TIME64_T_DEFINED |
| 122 |
#define _TIME64_T_DEFINED |
| 123 |
__MINGW_EXTENSION typedef __int64 __time64_t; |
| 124 |
#endif /* _TIME64_T_DEFINED */ |
| 125 |
|
| 126 |
#ifdef _USE_32BIT_TIME_T |
| 127 |
#ifdef _WIN64 |
| 128 |
#error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64 |
| 129 |
#undef _USE_32BIT_TIME_T |
| 130 |
#endif |
| 131 |
#endif /* _USE_32BIT_TIME_T */ |
| 132 |
|
| 133 |
#ifndef _TIME_T_DEFINED |
| 134 |
#define _TIME_T_DEFINED |
| 135 |
#ifdef _USE_32BIT_TIME_T |
| 136 |
typedef __time32_t time_t; |
| 137 |
#else |
| 138 |
typedef __time64_t time_t; |
| 139 |
#endif |
| 140 |
#endif /* _TIME_T_DEFINED */ |
| 141 |
|
| 142 |
#ifndef _CRT_SECURE_CPP_NOTHROW |
| 143 |
#define _CRT_SECURE_CPP_NOTHROW throw() |
| 144 |
#endif |
| 145 |
|
| 146 |
#ifndef __CRTDECL |
| 147 |
#if !defined(__cplusplus) && defined(__GNUC__) |
| 148 |
#define __CRTDECL __cdecl __attribute__ ((__unused__)) |
| 149 |
#else |
| 150 |
#define __CRTDECL __cdecl |
| 151 |
#endif |
| 152 |
#endif |
| 153 |
|
| 154 |
#ifdef _DEBUG |
| 155 |
_CRTIMP void __cdecl _invalid_parameter(const wchar_t *expression, const wchar_t *function_name, const wchar_t *file_name, unsigned int line_number, __UINTPTR_TYPE__ reserved); |
| 156 |
#endif |
| 157 |
_CRTIMP void __cdecl _invalid_parameter_noinfo(void); |
| 158 |
_CRTIMP __MINGW_ATTRIB_NORETURN void __cdecl _invalid_parameter_noinfo_noreturn(void); |
| 159 |
_CRTIMP __MINGW_ATTRIB_NORETURN void __cdecl _invoke_watson(const wchar_t *expression, const wchar_t *function_name, const wchar_t *file_name, unsigned int line_number, __UINTPTR_TYPE__ reserved); |
| 160 |
|
| 161 |
#if defined(__cplusplus) && _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES |
| 162 |
|
| 163 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(__ret,__func,__dsttype,__dst) \ |
| 164 |
extern "C++" { \ |
| 165 |
template <size_t __size> \ |
| 166 |
inline __ret __cdecl __func(__dsttype (&__dst)[__size]) { \ |
| 167 |
return __func(__dst,__size); \ |
| 168 |
} \ |
| 169 |
} |
| 170 |
|
| 171 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(__ret,__func,__dsttype,__dst,__type1,__arg1) \ |
| 172 |
extern "C++" {\ |
| 173 |
template <size_t __size> \ |
| 174 |
inline __ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1) { \ |
| 175 |
return __func(__dst,__size,__arg1); \ |
| 176 |
}\ |
| 177 |
} |
| 178 |
|
| 179 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2)\ |
| 180 |
extern "C++" {\ |
| 181 |
template <size_t __size> inline\ |
| 182 |
__ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2) { \ |
| 183 |
return __func(__dst,__size,__arg1,__arg2); \ |
| 184 |
}\ |
| 185 |
} |
| 186 |
|
| 187 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3) \ |
| 188 |
extern "C++" { \ |
| 189 |
template <size_t __size> inline \ |
| 190 |
__ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2, __type3 __arg3) { \ |
| 191 |
return __func(__dst,__size,__arg1,__arg2,__arg3); \ |
| 192 |
}\ |
| 193 |
} |
| 194 |
|
| 195 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3,__type4,__arg4) \ |
| 196 |
extern "C++" { \ |
| 197 |
template <size_t __size> inline \ |
| 198 |
__ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2, __type3 __arg3, __type4 __arg4) { \ |
| 199 |
return __func(__dst,__size,__arg1,__arg2,__arg3,__arg4); \ |
| 200 |
}\ |
| 201 |
} |
| 202 |
|
| 203 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1) \ |
| 204 |
extern "C++" { \ |
| 205 |
template <size_t __size> inline \ |
| 206 |
__ret __cdecl __func(__type0 __arg0, __dsttype (&__dst)[__size], __type1 __arg1) { \ |
| 207 |
return __func(__arg0, __dst, __size, __arg1); \ |
| 208 |
} \ |
| 209 |
} |
| 210 |
|
| 211 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_2(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1,__type2,__arg2) \ |
| 212 |
extern "C++" { \ |
| 213 |
template <size_t __size> inline \ |
| 214 |
__ret __cdecl __func(__type0 __arg0, __dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2) { \ |
| 215 |
return __func(__arg0, __dst, __size, __arg1, __arg2); \ |
| 216 |
} \ |
| 217 |
} |
| 218 |
|
| 219 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_3(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3) \ |
| 220 |
extern "C++" { \ |
| 221 |
template <size_t __size> inline \ |
| 222 |
__ret __cdecl __func(__type0 __arg0, __dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2, __type3 __arg3) { \ |
| 223 |
return __func(__arg0, __dst, __size, __arg1, __arg2, __arg3); \ |
| 224 |
} \ |
| 225 |
} |
| 226 |
|
| 227 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_2_0(__ret,__func,__type1,__arg1,__type2,__arg2,__dsttype,__dst) \ |
| 228 |
extern "C++" { \ |
| 229 |
template <size_t __size> inline \ |
| 230 |
__ret __cdecl __func(__type1 __arg1, __type2 __arg2, __dsttype (&__dst)[__size]) { \ |
| 231 |
return __func(__arg1, __arg2, __dst, __size); \ |
| 232 |
} \ |
| 233 |
} |
| 234 |
|
| 235 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(__ret,__func,__vfunc,__dsttype,__dst,__type1,__arg1) \ |
| 236 |
extern "C++" {\ |
| 237 |
template <size_t __size> \ |
| 238 |
inline __ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, ...) { \ |
| 239 |
va_list __vaargs; \ |
| 240 |
_crt_va_start(__vaargs, __arg1); \ |
| 241 |
__ret __retval = __vfunc(__dst,__size,__arg1,__vaargs); \ |
| 242 |
_crt_va_end(__vaargs); \ |
| 243 |
return __retval; \ |
| 244 |
}\ |
| 245 |
} |
| 246 |
|
| 247 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2_ARGLIST(__ret,__func,__vfunc,__dsttype,__dst,__type1,__arg1,__type2,__arg2) \ |
| 248 |
extern "C++" {\ |
| 249 |
template <size_t __size> \ |
| 250 |
inline __ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2, ...) { \ |
| 251 |
va_list __vaargs; \ |
| 252 |
_crt_va_start(__vaargs, __arg2); \ |
| 253 |
__ret __retval = __vfunc(__dst,__size,__arg1,__arg2,__vaargs); \ |
| 254 |
_crt_va_end(__vaargs); \ |
| 255 |
return __retval; \ |
| 256 |
}\ |
| 257 |
} |
| 258 |
|
| 259 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_SPLITPATH(__ret,__func,__dsttype,__src) \ |
| 260 |
extern "C++" { \ |
| 261 |
template <size_t __drive_size, size_t __dir_size, size_t __name_size, size_t __ext_size> inline \ |
| 262 |
__ret __cdecl __func(const __dsttype *__src, __dsttype (&__drive)[__drive_size], __dsttype (&__dir)[__dir_size], __dsttype (&__name)[__name_size], __dsttype (&__ext)[__ext_size]) { \ |
| 263 |
return __func(__src, __drive, __drive_size, __dir, __dir_size, __name, __name_size, __ext, __ext_size); \ |
| 264 |
} \ |
| 265 |
} |
| 266 |
|
| 267 |
#else |
| 268 |
|
| 269 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(__ret,__func,__dsttype,__dst) |
| 270 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(__ret,__func,__dsttype,__dst,__type1,__arg1) |
| 271 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2) |
| 272 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3) |
| 273 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3,__type4,__arg4) |
| 274 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1) |
| 275 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_2(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1,__type2,__arg2) |
| 276 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_3(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3) |
| 277 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_2_0(__ret,__func,__type1,__arg1,__type2,__arg2,__dsttype,__dst) |
| 278 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(__ret,__func,__vfunc,__dsttype,__dst,__type1,__arg1) |
| 279 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2_ARGLIST(__ret,__func,__vfunc,__dsttype,__dst,__type1,__arg1,__type2,__arg2) |
| 280 |
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_SPLITPATH(__ret,__func,__dsttype,__src) |
| 281 |
|
| 282 |
#endif |
| 283 |
|
| 284 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(__ret_type, __ret_policy, __decl_spec, __name, __dst_attr, __dst_type, __dst) \ |
| 285 |
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_EX(__ret_type, __ret_policy, __decl_spec, __func_name, __func_name##_s, __dst_attr, __dst_type, __dst) |
| 286 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(__ret_type, __ret_policy, __decl_spec, __name, __dst_attr, __dst_type, __dst, __arg1_type, __arg1) \ |
| 287 |
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_EX(__ret_type, __ret_policy, __decl_spec, __func_name, __func_name##_s, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2) |
| 288 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2(__ret_type, __ret_policy, __decl_spec, __name, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2) \ |
| 289 |
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_EX(__ret_type, __ret_policy, __decl_spec, __func_name, __func_name##_s, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2) |
| 290 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_3(__ret_type, __ret_policy, __decl_spec, __name, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2, __arg3_type, __arg3) \ |
| 291 |
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_3_EX(__ret_type, __ret_policy, __decl_spec, __func_name, __func_name##_s, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2, __arg3_type, __arg3) |
| 292 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4(__ret_type, __ret_policy, __decl_spec, __name, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2, __arg3_type, __arg3, __arg4_type, __arg4) \ |
| 293 |
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4_EX(__ret_type, __ret_policy, __decl_spec, __func_name, __func_name##_s, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2, __arg3_type, __arg3, __arg4_type, __arg4) |
| 294 |
|
| 295 |
#if defined(__cplusplus) && _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES |
| 296 |
|
| 297 |
#define __RETURN_POLICY_SAME(__func_call, __dst) return (__func_call) |
| 298 |
#define __RETURN_POLICY_DST(__func_call, __dst) return ((__func_call) == 0 ? __dst : 0) |
| 299 |
#define __RETURN_POLICY_VOID(__func_call, __dst) (__func_call); return |
| 300 |
#define __EMPTY_DECLSPEC |
| 301 |
|
| 302 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __dst_attr, __dst_type, __dst) \ |
| 303 |
__inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst) \ |
| 304 |
{ \ |
| 305 |
__decl_spec __ret_type __cdecl __name(__dst_type *__dst); \ |
| 306 |
return __name(__dst); \ |
| 307 |
} \ |
| 308 |
extern "C++" { \ |
| 309 |
template <typename _T> \ |
| 310 |
inline __ret_type __CRTDECL __name(_T &__dst) _CRT_SECURE_CPP_NOTHROW { \ |
| 311 |
return __insecure_##__name(static_cast<__dst_type*>(__dst)); \ |
| 312 |
} \ |
| 313 |
template <typename _T> \ |
| 314 |
inline __ret_type __CRTDECL __name(const _T &__dst) _CRT_SECURE_CPP_NOTHROW { \ |
| 315 |
return __insecure_##__name(static_cast<__dst_type *>(__dst)); \ |
| 316 |
} \ |
| 317 |
template <> \ |
| 318 |
inline __ret_type __CRTDECL __name(__dst_type *&__dst) _CRT_SECURE_CPP_NOTHROW { \ |
| 319 |
return __insecure_##__name(__dst); \ |
| 320 |
} \ |
| 321 |
template <size_t __size> \ |
| 322 |
inline __ret_type __CRTDECL __name(__dst_type (&__dst)[__size]) _CRT_SECURE_CPP_NOTHROW { \ |
| 323 |
__ret_policy(__sec_name(__dst, __size), __dst); \ |
| 324 |
} \ |
| 325 |
} |
| 326 |
|
| 327 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __sec_dst_type, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2) \ |
| 328 |
__inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst, __arg1_type __arg1, __arg2_type __arg2) \ |
| 329 |
{ \ |
| 330 |
__decl_spec __ret_type __cdecl __name(__dst_type *__dst, __arg1_type, __arg2_type); \ |
| 331 |
return __name(__dst, __arg1, __arg2); \ |
| 332 |
} \ |
| 333 |
extern "C++" { \ |
| 334 |
template <typename _T> \ |
| 335 |
inline __ret_type __CRTDECL __name(_T &__dst, __arg1_type __arg1, __arg2_type __arg2) _CRT_SECURE_CPP_NOTHROW { \ |
| 336 |
return __insecure_##__name(static_cast<__dst_type*>(__dst), __arg1, __arg2); \ |
| 337 |
} \ |
| 338 |
template <typename _T> \ |
| 339 |
inline __ret_type __CRTDECL __name(const _T &__dst, __arg1_type __arg1, __arg2_type __arg2) _CRT_SECURE_CPP_NOTHROW { \ |
| 340 |
return __insecure_##__name(static_cast<__dst_type *>(__dst), __arg1, __arg2); \ |
| 341 |
} \ |
| 342 |
template <> \ |
| 343 |
inline __ret_type __CRTDECL __name(__dst_type *&__dst, __arg1_type __arg1, __arg2_type __arg2) _CRT_SECURE_CPP_NOTHROW { \ |
| 344 |
return __insecure_##__name(__dst, __arg1, __arg2); \ |
| 345 |
} \ |
| 346 |
template <size_t __size> \ |
| 347 |
inline __ret_type __CRTDECL __name(__sec_dst_type (&__dst)[__size], __arg1_type __arg1, __arg2_type __arg2) _CRT_SECURE_CPP_NOTHROW { \ |
| 348 |
__ret_policy(__sec_name(__dst, __size), __dst); \ |
| 349 |
} \ |
| 350 |
} |
| 351 |
|
| 352 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __sec_dst_type, __dst_attr, __dst_type, __dst, __arg1_type, __arg1) \ |
| 353 |
__inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst, __arg1_type __arg1) \ |
| 354 |
{ \ |
| 355 |
__decl_spec __ret_type __cdecl __name(__dst_type *__dst, __arg1_type); \ |
| 356 |
return __name(__dst, __arg1); \ |
| 357 |
} \ |
| 358 |
extern "C++" { \ |
| 359 |
template <typename _T> \ |
| 360 |
inline __ret_type __CRTDECL __name(_T &__dst, __arg1_type __arg1) _CRT_SECURE_CPP_NOTHROW { \ |
| 361 |
return __insecure_##__name(static_cast<__dst_type*>(__dst), __arg1); \ |
| 362 |
} \ |
| 363 |
template <typename _T> \ |
| 364 |
inline __ret_type __CRTDECL __name(const _T &__dst, __arg1_type __arg1) _CRT_SECURE_CPP_NOTHROW { \ |
| 365 |
return __insecure_##__name(static_cast<__dst_type *>(__dst), __arg1); \ |
| 366 |
} \ |
| 367 |
template <> \ |
| 368 |
inline __ret_type __CRTDECL __name(__dst_type *&__dst, __arg1_type __arg1) _CRT_SECURE_CPP_NOTHROW { \ |
| 369 |
return __insecure_##__name(__dst, __arg1); \ |
| 370 |
} \ |
| 371 |
template <size_t __size> \ |
| 372 |
inline __ret_type __CRTDECL __name(__sec_dst_type (&__dst)[__size], __arg1_type __arg1) _CRT_SECURE_CPP_NOTHROW { \ |
| 373 |
__ret_policy(__sec_name(__dst, __size), __dst); \ |
| 374 |
} \ |
| 375 |
} |
| 376 |
|
| 377 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_3_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __sec_dst_type, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2, __arg3_type, __arg3) \ |
| 378 |
__inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) \ |
| 379 |
{ \ |
| 380 |
__decl_spec __ret_type __cdecl __name(__dst_type *__dst, __arg1_type, __arg2_type, __arg3_type); \ |
| 381 |
return __name(__dst, __arg1, __arg2, __arg3); \ |
| 382 |
} \ |
| 383 |
extern "C++" { \ |
| 384 |
template <typename _T> \ |
| 385 |
inline __ret_type __CRTDECL __name(_T &__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) _CRT_SECURE_CPP_NOTHROW { \ |
| 386 |
return __insecure_##__name(static_cast<__dst_type*>(__dst), __arg1, __arg2, __arg3); \ |
| 387 |
} \ |
| 388 |
template <typename _T> \ |
| 389 |
inline __ret_type __CRTDECL __name(const _T &__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) _CRT_SECURE_CPP_NOTHROW { \ |
| 390 |
return __insecure_##__name(static_cast<__dst_type *>(__dst), __arg1, __arg2, __arg3); \ |
| 391 |
} \ |
| 392 |
template <> \ |
| 393 |
inline __ret_type __CRTDECL __name(__dst_type *&__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) _CRT_SECURE_CPP_NOTHROW { \ |
| 394 |
return __insecure_##__name(__dst, __arg1, __arg2, __arg3); \ |
| 395 |
} \ |
| 396 |
template <size_t __size> \ |
| 397 |
inline __ret_type __CRTDECL __name(__sec_dst_type (&__dst)[__size], __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) _CRT_SECURE_CPP_NOTHROW { \ |
| 398 |
__ret_policy(__sec_name(__dst, __size), __dst); \ |
| 399 |
} \ |
| 400 |
} |
| 401 |
|
| 402 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __sec_dst_type, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2, __arg3_type, __arg3, __arg4_type, __arg4) \ |
| 403 |
__inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3, __arg4_type __arg4) \ |
| 404 |
{ \ |
| 405 |
__decl_spec __ret_type __cdecl __name(__dst_type *__dst, __arg1_type, __arg2_type, __arg3_type, __arg4_type); \ |
| 406 |
return __name(__dst, __arg1, __arg2, __arg3, __arg4); \ |
| 407 |
} \ |
| 408 |
extern "C++" { \ |
| 409 |
template <typename _T> \ |
| 410 |
inline __ret_type __CRTDECL __name(_T &__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3, __arg4_type __arg4) _CRT_SECURE_CPP_NOTHROW { \ |
| 411 |
return __insecure_##__name(static_cast<__dst_type*>(__dst), __arg1, __arg2, __arg3, __arg4); \ |
| 412 |
} \ |
| 413 |
template <typename _T> \ |
| 414 |
inline __ret_type __CRTDECL __name(const _T &__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3, __arg4_type __arg4) _CRT_SECURE_CPP_NOTHROW { \ |
| 415 |
return __insecure_##__name(static_cast<__dst_type *>(__dst), __arg1, __arg2, __arg3, __arg4); \ |
| 416 |
} \ |
| 417 |
template <> \ |
| 418 |
inline __ret_type __CRTDECL __name(__dst_type *&__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3, __arg4_type __arg4) _CRT_SECURE_CPP_NOTHROW { \ |
| 419 |
return __insecure_##__name(__dst, __arg1, __arg2, __arg3, __arg4); \ |
| 420 |
} \ |
| 421 |
template <size_t __size> \ |
| 422 |
inline __ret_type __CRTDECL __name(__sec_dst_type (&__dst)[__size], __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3, __arg4_type __arg4) _CRT_SECURE_CPP_NOTHROW { \ |
| 423 |
__ret_policy(__sec_name(__dst, __size)); \ |
| 424 |
} \ |
| 425 |
} |
| 426 |
|
| 427 |
#else |
| 428 |
|
| 429 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __dst_attr, __dst_type, __dst) |
| 430 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __dst_attr, __dst_type, __dst, __arg1_type, __arg1) |
| 431 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2) |
| 432 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_3_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2, __arg3_type, __arg3) |
| 433 |
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __dst_attr, __dst_type, __dst, __arg1_type, __arg1, __arg2_type, __arg2, __arg3_type, __arg3, __arg4_type, __arg4) |
| 434 |
|
| 435 |
#endif |
| 436 |
|
| 437 |
struct threadlocaleinfostruct; |
| 438 |
struct threadmbcinfostruct; |
| 439 |
typedef struct threadlocaleinfostruct *pthreadlocinfo; |
| 440 |
typedef struct threadmbcinfostruct *pthreadmbcinfo; |
| 441 |
struct __lc_time_data; |
| 442 |
|
| 443 |
typedef struct localeinfo_struct { |
| 444 |
pthreadlocinfo locinfo; |
| 445 |
pthreadmbcinfo mbcinfo; |
| 446 |
} _locale_tstruct,*_locale_t; |
| 447 |
|
| 448 |
#ifndef _TAGLC_ID_DEFINED |
| 449 |
#define _TAGLC_ID_DEFINED |
| 450 |
typedef struct tagLC_ID { |
| 451 |
unsigned short wLanguage; |
| 452 |
unsigned short wCountry; |
| 453 |
unsigned short wCodePage; |
| 454 |
} LC_ID,*LPLC_ID; |
| 455 |
#endif /* _TAGLC_ID_DEFINED */ |
| 456 |
|
| 457 |
#ifndef _THREADLOCALEINFO |
| 458 |
#define _THREADLOCALEINFO |
| 459 |
typedef struct threadlocaleinfostruct { |
| 460 |
#ifdef _UCRT |
| 461 |
const unsigned short *_locale_pctype; |
| 462 |
int _locale_mb_cur_max; |
| 463 |
unsigned int _locale_lc_codepage; |
| 464 |
#else |
| 465 |
int refcount; |
| 466 |
unsigned int lc_codepage; |
| 467 |
unsigned int lc_collate_cp; |
| 468 |
unsigned long lc_handle[6]; |
| 469 |
LC_ID lc_id[6]; |
| 470 |
struct { |
| 471 |
char *locale; |
| 472 |
wchar_t *wlocale; |
| 473 |
int *refcount; |
| 474 |
int *wrefcount; |
| 475 |
} lc_category[6]; |
| 476 |
int lc_clike; |
| 477 |
int mb_cur_max; |
| 478 |
int *lconv_intl_refcount; |
| 479 |
int *lconv_num_refcount; |
| 480 |
int *lconv_mon_refcount; |
| 481 |
struct lconv *lconv; |
| 482 |
int *ctype1_refcount; |
| 483 |
unsigned short *ctype1; |
| 484 |
const unsigned short *pctype; |
| 485 |
const unsigned char *pclmap; |
| 486 |
const unsigned char *pcumap; |
| 487 |
struct __lc_time_data *lc_time_curr; |
| 488 |
#endif |
| 489 |
} threadlocinfo; |
| 490 |
#endif /* _THREADLOCALEINFO */ |
| 491 |
|
| 492 |
#ifndef __crt_typefix |
| 493 |
#define __crt_typefix(ctype) |
| 494 |
#endif |
| 495 |
|
| 496 |
#ifndef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP |
| 497 |
#ifdef WINAPI_FAMILY |
| 498 |
#include <winapifamily.h> |
| 499 |
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) |
| 500 |
#define _CRT_USE_WINAPI_FAMILY_DESKTOP_APP |
| 501 |
#endif |
| 502 |
#else /* !WINAPI_FAMILY */ |
| 503 |
#define _CRT_USE_WINAPI_FAMILY_DESKTOP_APP |
| 504 |
#endif /* !WINAPI_FAMILY */ |
| 505 |
#endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */ |
| 506 |
|
| 507 |
#ifndef __WIDL__ |
| 508 |
#pragma pack(pop) |
| 509 |
#endif |
| 510 |
|
| 511 |
#endif /* _INC_CORECRT */ |