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