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_CRTDEFS
8#define _INC_CRTDEFS
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 */
20typedef 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
37typedef 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
47typedef int ssize_t;
48#endif /* _WIN64 */
49#endif /* _SSIZE_T_DEFINED */
50
51#ifndef _RSIZE_T_DEFINED
52typedef 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
64typedef 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
77typedef 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
90typedef 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__)
98typedef 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
106typedef unsigned short wint_t;
107typedef unsigned short wctype_t;
108#endif /* _WINT_T */
109#endif /* _WCTYPE_T_DEFINED */
110
111#ifndef _ERRCODE_DEFINED
112#define _ERRCODE_DEFINED
113typedef int errno_t;
114#endif
115
116#ifndef _TIME32_T_DEFINED
117#define _TIME32_T_DEFINED
118typedef 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
136typedef __time32_t time_t;
137#else
138typedef __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#if defined(__cplusplus) && _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES
147
148#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(__ret,__func,__dsttype,__dst) \
149  extern "C++" { \
150    template <size_t __size> \
151    inline __ret __cdecl __func(__dsttype (&__dst)[__size]) { \
152        return __func(__dst,__size); \
153    } \
154  }
155
156#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(__ret,__func,__dsttype,__dst,__type1,__arg1) \
157  extern "C++" {\
158    template <size_t __size> \
159    inline __ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1) { \
160        return __func(__dst,__size,__arg1);  \
161    }\
162  }
163
164#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2)\
165  extern "C++" {\
166    template <size_t __size> inline\
167    __ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2) { \
168        return __func(__dst,__size,__arg1,__arg2);  \
169    }\
170  }
171
172#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3) \
173  extern "C++" { \
174    template <size_t __size> inline \
175    __ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2, __type3 __arg3) { \
176        return __func(__dst,__size,__arg1,__arg2,__arg3); \
177    }\
178  }
179
180#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3,__type4,__arg4) \
181  extern "C++" { \
182    template <size_t __size> inline \
183    __ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2, __type3 __arg3, __type4 __arg4) { \
184        return __func(__dst,__size,__arg1,__arg2,__arg3,__arg4); \
185    }\
186  }
187
188#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1) \
189  extern "C++" { \
190    template <size_t __size> inline \
191      __ret __cdecl __func(__type0 __arg0, __dsttype (&__dst)[__size], __type1 __arg1) { \
192      return __func(__arg0, __dst, __size, __arg1); \
193    } \
194  }
195
196#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_2(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1,__type2,__arg2) \
197  extern "C++" { \
198    template <size_t __size> inline \
199    __ret __cdecl __func(__type0 __arg0, __dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2) { \
200      return __func(__arg0, __dst, __size, __arg1, __arg2); \
201    } \
202  }
203
204#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_3(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3) \
205  extern "C++" { \
206    template <size_t __size> inline \
207      __ret __cdecl __func(__type0 __arg0, __dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2, __type3 __arg3) { \
208      return __func(__arg0, __dst, __size, __arg1, __arg2, __arg3); \
209    } \
210  }
211
212#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_2_0(__ret,__func,__type1,__arg1,__type2,__arg2,__dsttype,__dst) \
213  extern "C++" { \
214    template <size_t __size> inline \
215    __ret __cdecl __func(__type1 __arg1, __type2 __arg2, __dsttype (&__dst)[__size]) { \
216      return __func(__arg1, __arg2, __dst, __size); \
217    } \
218  }
219
220#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(__ret,__func,__vfunc,__dsttype,__dst,__type1,__arg1) \
221  extern "C++" {\
222    template <size_t __size> \
223    inline __ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, ...) { \
224      va_list __vaargs; \
225      _crt_va_start(__vaargs, __arg1); \
226      __ret __retval = __vfunc(__dst,__size,__arg1,__vaargs); \
227      _crt_va_end(__vaargs); \
228      return __retval; \
229    }\
230  }
231
232#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2_ARGLIST(__ret,__func,__vfunc,__dsttype,__dst,__type1,__arg1,__type2,__arg2) \
233  extern "C++" {\
234    template <size_t __size> \
235    inline __ret __cdecl __func(__dsttype (&__dst)[__size], __type1 __arg1, __type2 __arg2, ...) { \
236      va_list __vaargs; \
237      _crt_va_start(__vaargs, __arg2); \
238      __ret __retval = __vfunc(__dst,__size,__arg1,__arg2,__vaargs); \
239      _crt_va_end(__vaargs); \
240      return __retval; \
241    }\
242  }
243
244#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_SPLITPATH(__ret,__func,__dsttype,__src) \
245  extern "C++" { \
246    template <size_t __drive_size, size_t __dir_size, size_t __name_size, size_t __ext_size> inline \
247    __ret __cdecl __func(const __dsttype *__src, __dsttype (&__drive)[__drive_size], __dsttype (&__dir)[__dir_size], __dsttype (&__name)[__name_size], __dsttype (&__ext)[__ext_size]) { \
248        return __func(__src, __drive, __drive_size, __dir, __dir_size, __name, __name_size, __ext, __ext_size); \
249    } \
250  }
251
252#else
253
254#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(__ret,__func,__dsttype,__dst)
255#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(__ret,__func,__dsttype,__dst,__type1,__arg1)
256#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2)
257#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_3(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3)
258#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(__ret,__func,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3,__type4,__arg4)
259#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1)
260#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_2(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1,__type2,__arg2)
261#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_3(__ret,__func,__type0,__arg0,__dsttype,__dst,__type1,__arg1,__type2,__arg2,__type3,__arg3)
262#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_2_0(__ret,__func,__type1,__arg1,__type2,__arg2,__dsttype,__dst)
263#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(__ret,__func,__vfunc,__dsttype,__dst,__type1,__arg1)
264#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2_ARGLIST(__ret,__func,__vfunc,__dsttype,__dst,__type1,__arg1,__type2,__arg2)
265#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_SPLITPATH(__ret,__func,__dsttype,__src)
266
267#endif
268
269#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(__ret_type, __ret_policy, __decl_spec, __name, __dst_attr, __dst_type, __dst) \
270    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_EX(__ret_type, __ret_policy, __decl_spec, __func_name, __func_name##_s, __dst_attr, __dst_type, __dst)
271#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(__ret_type, __ret_policy, __decl_spec, __name, __dst_attr, __dst_type, __dst, __arg1_type, __arg1) \
272    __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)
273#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) \
274    __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)
275#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) \
276    __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)
277#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) \
278    __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)
279
280#if defined(__cplusplus) && _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
281
282#define __RETURN_POLICY_SAME(__func_call, __dst) return (__func_call)
283#define __RETURN_POLICY_DST(__func_call, __dst) return ((__func_call) == 0 ? __dst : 0)
284#define __RETURN_POLICY_VOID(__func_call, __dst) (__func_call); return
285#define __EMPTY_DECLSPEC
286
287#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __dst_attr, __dst_type, __dst) \
288    __inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst) \
289    { \
290        __decl_spec __ret_type __cdecl __name(__dst_type *__dst); \
291        return __name(__dst); \
292    } \
293    extern "C++" { \
294    template <typename _T> \
295    inline __ret_type __CRTDECL __name(_T &__dst) _CRT_SECURE_CPP_NOTHROW { \
296        return __insecure_##__name(static_cast<__dst_type*>(__dst)); \
297    } \
298    template <typename _T> \
299    inline __ret_type __CRTDECL __name(const _T &__dst) _CRT_SECURE_CPP_NOTHROW { \
300        return __insecure_##__name(static_cast<__dst_type *>(__dst)); \
301    } \
302    template <> \
303    inline __ret_type __CRTDECL __name(__dst_type *&__dst) _CRT_SECURE_CPP_NOTHROW { \
304        return __insecure_##__name(__dst); \
305    } \
306    template <size_t __size> \
307    inline __ret_type __CRTDECL __name(__dst_type (&__dst)[__size]) _CRT_SECURE_CPP_NOTHROW { \
308        __ret_policy(__sec_name(__dst, __size), __dst); \
309    } \
310    }
311
312#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) \
313    __inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst, __arg1_type __arg1, __arg2_type __arg2) \
314    { \
315        __decl_spec __ret_type __cdecl __name(__dst_type *__dst, __arg1_type, __arg2_type); \
316        return __name(__dst, __arg1, __arg2); \
317    } \
318    extern "C++" { \
319    template <typename _T> \
320    inline __ret_type __CRTDECL __name(_T &__dst, __arg1_type __arg1, __arg2_type __arg2) _CRT_SECURE_CPP_NOTHROW { \
321        return __insecure_##__name(static_cast<__dst_type*>(__dst), __arg1, __arg2); \
322    } \
323    template <typename _T> \
324    inline __ret_type __CRTDECL __name(const _T &__dst, __arg1_type __arg1, __arg2_type __arg2) _CRT_SECURE_CPP_NOTHROW { \
325        return __insecure_##__name(static_cast<__dst_type *>(__dst), __arg1, __arg2); \
326    } \
327    template <> \
328    inline __ret_type __CRTDECL __name(__dst_type *&__dst, __arg1_type __arg1, __arg2_type __arg2) _CRT_SECURE_CPP_NOTHROW { \
329        return __insecure_##__name(__dst, __arg1, __arg2); \
330    } \
331    template <size_t __size> \
332    inline __ret_type __CRTDECL __name(__sec_dst_type (&__dst)[__size], __arg1_type __arg1, __arg2_type __arg2) _CRT_SECURE_CPP_NOTHROW { \
333        __ret_policy(__sec_name(__dst, __size), __dst); \
334    } \
335    }
336
337#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) \
338    __inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst, __arg1_type __arg1) \
339    { \
340        __decl_spec __ret_type __cdecl __name(__dst_type *__dst, __arg1_type); \
341        return __name(__dst, __arg1); \
342    } \
343    extern "C++" { \
344    template <typename _T> \
345    inline __ret_type __CRTDECL __name(_T &__dst, __arg1_type __arg1) _CRT_SECURE_CPP_NOTHROW { \
346        return __insecure_##__name(static_cast<__dst_type*>(__dst), __arg1); \
347    } \
348    template <typename _T> \
349    inline __ret_type __CRTDECL __name(const _T &__dst, __arg1_type __arg1) _CRT_SECURE_CPP_NOTHROW { \
350        return __insecure_##__name(static_cast<__dst_type *>(__dst), __arg1); \
351    } \
352    template <> \
353    inline __ret_type __CRTDECL __name(__dst_type *&__dst, __arg1_type __arg1) _CRT_SECURE_CPP_NOTHROW { \
354        return __insecure_##__name(__dst, __arg1); \
355    } \
356    template <size_t __size> \
357    inline __ret_type __CRTDECL __name(__sec_dst_type (&__dst)[__size], __arg1_type __arg1) _CRT_SECURE_CPP_NOTHROW { \
358        __ret_policy(__sec_name(__dst, __size), __dst); \
359    } \
360    }
361
362#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) \
363    __inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) \
364    { \
365        __decl_spec __ret_type __cdecl __name(__dst_type *__dst, __arg1_type, __arg2_type, __arg3_type); \
366        return __name(__dst, __arg1, __arg2, __arg3); \
367    } \
368    extern "C++" { \
369    template <typename _T> \
370    inline __ret_type __CRTDECL __name(_T &__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) _CRT_SECURE_CPP_NOTHROW { \
371        return __insecure_##__name(static_cast<__dst_type*>(__dst), __arg1, __arg2, __arg3); \
372    } \
373    template <typename _T> \
374    inline __ret_type __CRTDECL __name(const _T &__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) _CRT_SECURE_CPP_NOTHROW { \
375        return __insecure_##__name(static_cast<__dst_type *>(__dst), __arg1, __arg2, __arg3); \
376    } \
377    template <> \
378    inline __ret_type __CRTDECL __name(__dst_type *&__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) _CRT_SECURE_CPP_NOTHROW { \
379        return __insecure_##__name(__dst, __arg1, __arg2, __arg3); \
380    } \
381    template <size_t __size> \
382    inline __ret_type __CRTDECL __name(__sec_dst_type (&__dst)[__size], __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3) _CRT_SECURE_CPP_NOTHROW { \
383        __ret_policy(__sec_name(__dst, __size), __dst); \
384    } \
385    }
386
387#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) \
388    __inline __ret_type __CRTDECL __insecure_##__name(__dst_attr __dst_type *__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3, __arg4_type __arg4) \
389    { \
390        __decl_spec __ret_type __cdecl __name(__dst_type *__dst, __arg1_type, __arg2_type, __arg3_type, __arg4_type); \
391        return __name(__dst, __arg1, __arg2, __arg3, __arg4); \
392    } \
393    extern "C++" { \
394    template <typename _T> \
395    inline __ret_type __CRTDECL __name(_T &__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3, __arg4_type __arg4) _CRT_SECURE_CPP_NOTHROW { \
396        return __insecure_##__name(static_cast<__dst_type*>(__dst), __arg1, __arg2, __arg3, __arg4); \
397    } \
398    template <typename _T> \
399    inline __ret_type __CRTDECL __name(const _T &__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3, __arg4_type __arg4) _CRT_SECURE_CPP_NOTHROW { \
400        return __insecure_##__name(static_cast<__dst_type *>(__dst), __arg1, __arg2, __arg3, __arg4); \
401    } \
402    template <> \
403    inline __ret_type __CRTDECL __name(__dst_type *&__dst, __arg1_type __arg1, __arg2_type __arg2, __arg3_type __arg3, __arg4_type __arg4) _CRT_SECURE_CPP_NOTHROW { \
404        return __insecure_##__name(__dst, __arg1, __arg2, __arg3, __arg4); \
405    } \
406    template <size_t __size> \
407    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 { \
408        __ret_policy(__sec_name(__dst, __size)); \
409    } \
410    }
411
412#else
413
414#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0_EX(__ret_type, __ret_policy, __decl_spec, __name, __sec_name, __dst_attr, __dst_type, __dst)
415#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)
416#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)
417#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)
418#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)
419
420#endif
421
422struct threadlocaleinfostruct;
423struct threadmbcinfostruct;
424typedef struct threadlocaleinfostruct *pthreadlocinfo;
425typedef struct threadmbcinfostruct *pthreadmbcinfo;
426struct __lc_time_data;
427
428typedef struct localeinfo_struct {
429  pthreadlocinfo locinfo;
430  pthreadmbcinfo mbcinfo;
431} _locale_tstruct,*_locale_t;
432
433#ifndef _TAGLC_ID_DEFINED
434#define _TAGLC_ID_DEFINED
435typedef struct tagLC_ID {
436  unsigned short wLanguage;
437  unsigned short wCountry;
438  unsigned short wCodePage;
439} LC_ID,*LPLC_ID;
440#endif /* _TAGLC_ID_DEFINED */
441
442#ifndef _THREADLOCALEINFO
443#define _THREADLOCALEINFO
444typedef struct threadlocaleinfostruct {
445  int refcount;
446  unsigned int lc_codepage;
447  unsigned int lc_collate_cp;
448  unsigned long lc_handle[6];
449  LC_ID lc_id[6];
450  struct {
451    char *locale;
452    wchar_t *wlocale;
453    int *refcount;
454    int *wrefcount;
455  } lc_category[6];
456  int lc_clike;
457  int mb_cur_max;
458  int *lconv_intl_refcount;
459  int *lconv_num_refcount;
460  int *lconv_mon_refcount;
461  struct lconv *lconv;
462  int *ctype1_refcount;
463  unsigned short *ctype1;
464  const unsigned short *pctype;
465  const unsigned char *pclmap;
466  const unsigned char *pcumap;
467  struct __lc_time_data *lc_time_curr;
468} threadlocinfo;
469#endif /* _THREADLOCALEINFO */
470
471#ifndef __crt_typefix
472#define __crt_typefix(ctype)
473#endif
474
475#ifndef __WIDL__
476#pragma pack(pop)
477#endif
478
479#endif /* _INC_CRTDEFS */
480