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#ifndef _INC_WCHAR
7#define _INC_WCHAR
8
9#include <corecrt.h>
10#include <corecrt_stdio_config.h>
11#include <corecrt_wconio.h>
12#include <corecrt_wstdlib.h>
13#include <corecrt_wctype.h>
14
15#if __USE_MINGW_ANSI_STDIO && !defined (__USE_MINGW_STRTOX) && !defined(_CRTBLD)
16#define __USE_MINGW_STRTOX 1
17#endif
18
19#if defined(__LIBMSVCRT__)
20/* When building mingw-w64, this should be blank. */
21#define _SECIMP
22#else
23#ifndef _SECIMP
24#define _SECIMP __declspec(dllimport)
25#endif /* _SECIMP */
26#endif /* defined(__LIBMSVCRT__) */
27
28#pragma pack(push,_CRT_PACKING)
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#ifndef WCHAR_MIN /* also in stdint.h */
35#define WCHAR_MIN 0U
36#define WCHAR_MAX 0xffffU
37#endif
38
39#ifndef WEOF
40#define WEOF (wint_t)(0xFFFF)
41#endif
42
43#ifndef _FILE_DEFINED
44 struct _iobuf {
45#ifdef _UCRT
46 void *_Placeholder;
47#else
48 char *_ptr;
49 int _cnt;
50 char *_base;
51 int _flag;
52 int _file;
53 int _charbuf;
54 int _bufsiz;
55 char *_tmpfname;
56#endif
57 };
58 typedef struct _iobuf FILE;
59#define _FILE_DEFINED
60#endif
61
62_CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index);
63#ifndef _STDIO_DEFINED
64 _CRTIMP FILE *__cdecl __iob_func(void);
65#define _iob __iob_func()
66#endif
67
68#ifndef _STDSTREAM_DEFINED
69#define stdin (__acrt_iob_func(0))
70#define stdout (__acrt_iob_func(1))
71#define stderr (__acrt_iob_func(2))
72#define _STDSTREAM_DEFINED
73#endif
74
75#ifndef _FSIZE_T_DEFINED
76 typedef unsigned long _fsize_t;
77#define _FSIZE_T_DEFINED
78#endif
79
80#ifndef _WFINDDATA_T_DEFINED
81 struct _wfinddata32_t {
82 unsigned attrib;
83 __time32_t time_create;
84 __time32_t time_access;
85 __time32_t time_write;
86 _fsize_t size;
87 wchar_t name[260];
88 };
89
90 struct _wfinddata32i64_t {
91 unsigned attrib;
92 __time32_t time_create;
93 __time32_t time_access;
94 __time32_t time_write;
95 __MINGW_EXTENSION __int64 size;
96 wchar_t name[260];
97 };
98
99 struct _wfinddata64i32_t {
100 unsigned attrib;
101 __time64_t time_create;
102 __time64_t time_access;
103 __time64_t time_write;
104 _fsize_t size;
105 wchar_t name[260];
106 };
107
108 struct _wfinddata64_t {
109 unsigned attrib;
110 __time64_t time_create;
111 __time64_t time_access;
112 __time64_t time_write;
113 __MINGW_EXTENSION __int64 size;
114 wchar_t name[260];
115 };
116/* #endif */
117
118/*
119 * To prevent ABI issues, the mingw-w64 runtime should not call these
120 * functions. Instead it should call the fixed-size variants.
121 */
122#ifndef _CRTBLD
123#ifdef _USE_32BIT_TIME_T
124#define _wfinddata_t _wfinddata32_t
125#define _wfinddatai64_t _wfinddata32i64_t
126
127#define _wfindfirst _wfindfirst32
128#define _wfindnext _wfindnext32
129#define _wfindfirst32i64 _wfindfirsti64
130#define _wfindnext32i64 _wfindnexti64
131#else
132#define _wfinddata_t _wfinddata64i32_t
133#define _wfinddatai64_t _wfinddata64_t
134
135#define _wfindfirst _wfindfirst64i32
136#define _wfindnext _wfindnext64i32
137#define _wfindfirsti64 _wfindfirst64
138#define _wfindnexti64 _wfindnext64
139#endif
140#endif /* _CRTBLD */
141
142#define _WFINDDATA_T_DEFINED
143#endif
144
145#ifndef NULL
146#ifdef __cplusplus
147#ifndef _WIN64
148#define NULL 0
149#else
150#define NULL 0LL
151#endif /* W64 */
152#else
153#define NULL ((void *)0)
154#endif
155#endif
156
157#ifndef _CONST_RETURN
158#define _CONST_RETURN
159#endif
160
161#define _WConst_return _CONST_RETURN
162
163#ifndef _WDIRECT_DEFINED
164#define _WDIRECT_DEFINED
165
166#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
167#pragma push_macro("_wgetcwd")
168#undef _wgetcwd
169#pragma push_macro("_wgetdcwd")
170#undef _wgetdcwd
171#pragma push_macro("_wgetdcwd_nolock")
172#undef _wgetdcwd_nolock
173#endif
174 _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
175 _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
176#if __MSVCRT_VERSION__ >= 0x800
177 wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
178#endif
179#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
180#pragma pop_macro("_wgetcwd")
181#pragma pop_macro("_wgetdcwd")
182#pragma pop_macro("_wgetdcwd_nolock")
183#endif
184 _CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
185 _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
186 _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
187#endif
188
189#ifndef _WIO_DEFINED
190#define _WIO_DEFINED
191
192 _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
193 _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
194 _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
195 _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
196 _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
197 _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
198 _CRTIMP int __cdecl _wrename(const wchar_t *_OldFilename,const wchar_t *_NewFilename);
199 _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
200 _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
201 _CRTIMP intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
202 _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
203 _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
204 _CRTIMP int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
205 _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
206 _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
207 _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
208 _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
209#endif
210
211#ifndef _WLOCALE_DEFINED
212#define _WLOCALE_DEFINED
213 _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
214#endif
215
216#if __MSVCRT_VERSION__ >= 0xB00
217 _CRTIMP _locale_t __cdecl _wcreate_locale(int _Category, const wchar_t *_Locale);
218#endif
219
220#ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
221#ifndef _WEXEC_DEFINED
222#define _WEXEC_DEFINED
223 _CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...);
224 _CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...);
225 _CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...);
226 _CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...);
227 _CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList);
228 _CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
229 _CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList);
230 _CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
231#endif
232
233#ifndef _WSPAWN_DEFINED
234#define _WSPAWN_DEFINED
235 _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
236 _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
237 _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
238 _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
239 _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
240 _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
241 _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
242 _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
243#endif
244
245#ifndef _CRT_WSYSTEM_DEFINED
246#define _CRT_WSYSTEM_DEFINED
247 _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
248#endif
249#endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */
250
251#if !defined(_POSIX_) || defined(__GNUC__)
252#ifndef _INO_T_DEFINED
253#define _INO_T_DEFINED
254 typedef unsigned short _ino_t;
255#ifndef NO_OLDNAMES
256 typedef unsigned short ino_t;
257#endif
258#endif
259
260#ifndef _DEV_T_DEFINED
261#define _DEV_T_DEFINED
262 typedef unsigned int _dev_t;
263#ifndef NO_OLDNAMES
264 typedef unsigned int dev_t;
265#endif
266#endif
267
268#include <_mingw_off_t.h>
269#include <_mingw_stat64.h>
270
271#ifndef _WSTAT_DEFINED
272#define _WSTAT_DEFINED
273
274 _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
275 _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
276 _CRTIMP int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
277 _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
278#endif
279#endif
280
281#ifdef _UCRT
282 int __cdecl __stdio_common_vswprintf_p(unsigned __int64 _Options, wchar_t *_Str, size_t _Len, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList);
283 int __cdecl __stdio_common_vfwprintf_p(unsigned __int64 _Options, FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList);
284#endif
285
286#ifndef _WSTDIO_DEFINED
287#define _WSTDIO_DEFINED
288
289/* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
290 int __cdecl __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...);
291/* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
292 int __cdecl __mingw_vswscanf (const wchar_t * __restrict__ _Str,const wchar_t * __restrict__ Format,va_list argp);
293/* __attribute__((__format__ (gnu_wscanf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
294 int __cdecl __mingw_wscanf(const wchar_t * __restrict__ _Format,...);
295/* __attribute__((__format__ (gnu_wscanf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
296 int __cdecl __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list argp);
297/* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
298 int __cdecl __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
299/* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
300 int __cdecl __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * __restrict__ Format,va_list argp);
301
302
303/* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
304 int __cdecl __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
305/* __attribute__((__format__ (gnu_wprintf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
306 int __cdecl __mingw_wprintf(const wchar_t * __restrict__ _Format,...);
307/* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
308 int __cdecl __mingw_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
309/* __attribute__((__format__ (gnu_printf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
310 int __cdecl __mingw_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
311/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
312 int __cdecl __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...);
313/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3)
314 int __cdecl __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list);
315/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
316 int __cdecl __mingw_swprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...);
317/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3)
318 int __cdecl __mingw_vswprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ ,va_list);
319
320/* __attribute__((__format__ (ms_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
321 int __cdecl __ms_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...)
322 __MINGW_UCRT_ASM_CALL(swscanf);
323/* __attribute__((__format__ (ms_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
324 int __cdecl __ms_vswscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,va_list)
325 __MINGW_ASM_CALL(vswscanf);
326/* __attribute__((__format__ (ms_wscanf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
327 int __cdecl __ms_wscanf(const wchar_t * __restrict__ _Format,...)
328 __MINGW_UCRT_ASM_CALL(wscanf);
329/* __attribute__((__format__ (ms_wscanf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
330 int __cdecl __ms_vwscanf(const wchar_t * __restrict__ _Format, va_list)
331 __MINGW_ASM_CALL(vwscanf);
332/* __attribute__((__format__ (ms_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
333 int __cdecl __ms_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...)
334 __MINGW_UCRT_ASM_CALL(fwscanf);
335/* __attribute__((__format__ (ms_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
336 int __cdecl __ms_vfwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list)
337 __MINGW_ASM_CALL(vfwscanf);
338
339/* __attribute__((__format__ (ms_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
340 int __cdecl __ms_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
341 /* No __MINGW_UCRT_ASM_CALL for __ms_fwprintf; this is provided as an
342 * actual function in the ucrt import libraries. */
343/* __attribute__((__format__ (ms_wprintf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
344 int __cdecl __ms_wprintf(const wchar_t * __restrict__ _Format,...)
345 __MINGW_UCRT_ASM_CALL(wprintf);
346/* __attribute__((__format__ (ms_wprintf, 2, 0))) */__MINGW_ATTRIB_NONNULL(2)
347 int __cdecl __ms_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList)
348 __MINGW_UCRT_ASM_CALL(vfwprintf);
349/*__attribute__((__format__ (ms_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
350 int __cdecl __ms_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList)
351 __MINGW_UCRT_ASM_CALL(vwprintf);
352/* __attribute__((__format__ (ms_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
353 int __cdecl __ms_swprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...)
354 __MINGW_UCRT_ASM_CALL(swprintf);
355/* __attribute__((__format__ (ms_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3)
356 int __cdecl __ms_vswprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ ,va_list)
357 __MINGW_UCRT_ASM_CALL(vswprintf);
358/* __attribute__((__format__ (ms_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
359 int __cdecl __ms_snwprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , ...)
360 __MINGW_UCRT_ASM_CALL(snwprintf);
361/* __attribute__((__format__ (ms_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3)
362 int __cdecl __ms_vsnwprintf(wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list)
363 __MINGW_UCRT_ASM_CALL(vsnwprintf);
364
365#ifdef _UCRT
366 int __cdecl __stdio_common_vswprintf(unsigned __int64 options, wchar_t *str, size_t len, const wchar_t *format, _locale_t locale, va_list valist);
367 int __cdecl __stdio_common_vfwprintf(unsigned __int64 options, FILE *file, const wchar_t *format, _locale_t locale, va_list valist);
368 int __cdecl __stdio_common_vswscanf(unsigned __int64 options, const wchar_t *input, size_t length, const wchar_t *format, _locale_t locale, va_list valist);
369 int __cdecl __stdio_common_vfwscanf(unsigned __int64 options, FILE *file, const wchar_t *format, _locale_t locale, va_list valist);
370#endif
371
372#if __USE_MINGW_ANSI_STDIO
373
374/*
375 * User has expressed a preference for C99 conformance...
376 */
377/* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
378int swscanf(const wchar_t *__source, const wchar_t *__format, ...)
379__MINGW_ASM_CALL(__mingw_swscanf);
380
381/* __attribute__((__format__ (gnu_wscanf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
382int wscanf(const wchar_t *__format, ...)
383__MINGW_ASM_CALL(__mingw_wscanf);
384
385/* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
386int fwscanf(FILE *__stream, const wchar_t *__format, ...)
387__MINGW_ASM_CALL(__mingw_fwscanf);
388
389#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
390/* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
391int vswscanf (const wchar_t *__source, const wchar_t *__format, __builtin_va_list __local_argv)
392__MINGW_ASM_CALL(__mingw_vswscanf);
393
394/* __attribute__((__format__ (gnu_wscanf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
395int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv)
396__MINGW_ASM_CALL(__mingw_vwscanf);
397
398/* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
399int vfwscanf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv)
400__MINGW_ASM_CALL(__mingw_vfwscanf);
401#endif /* __NO_ISOCEXT */
402
403
404
405/* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
406int fwprintf (FILE *__stream, const wchar_t *__format, ...)
407__MINGW_ASM_CALL(__mingw_fwprintf);
408
409/* __attribute__((__format__ (gnu_wprintf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
410int wprintf (const wchar_t *__format, ...)
411__MINGW_ASM_CALL(__mingw_wprintf);
412
413/* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
414int vfwprintf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv)
415__MINGW_ASM_CALL(__mingw_vfwprintf);
416
417/* __attribute__((__format__ (gnu_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
418int vwprintf (const wchar_t *__format, __builtin_va_list __local_argv)
419__MINGW_ASM_CALL(__mingw_vwprintf);
420
421/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
422int swprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...)
423__MINGW_ASM_CALL(__mingw_swprintf);
424
425/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3)
426int vswprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv)
427__MINGW_ASM_CALL(__mingw_vswprintf);
428
429#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
430
431/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
432int snwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...)
433__MINGW_ASM_CALL(__mingw_snwprintf);
434
435/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3)
436int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv)
437__MINGW_ASM_CALL(__mingw_vsnwprintf);
438
439#endif /* __NO_ISOCEXT */
440
441#else /* !__USE_MINGW_ANSI_STDIO */
442 __MINGW_ATTRIB_DEPRECATED_SEC_WARN
443 int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
444
445 __MINGW_ATTRIB_DEPRECATED_SEC_WARN
446 int __cdecl swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...);
447
448 __MINGW_ATTRIB_DEPRECATED_SEC_WARN
449 int __cdecl wscanf(const wchar_t * __restrict__ _Format,...);
450
451 __MINGW_ATTRIB_NONNULL(2)
452 int __cdecl vfwscanf(FILE *__stream, const wchar_t *__format, va_list __local_argv);
453
454 __MINGW_ATTRIB_NONNULL(2)
455 int __cdecl vswscanf(const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, va_list __local_argv);
456
457 __MINGW_ATTRIB_NONNULL(1)
458 int __cdecl vwscanf(const wchar_t *__format, va_list __local_argv);
459
460 int __cdecl fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
461 int __cdecl wprintf(const wchar_t * __restrict__ _Format,...);
462 int __cdecl vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
463 int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
464 int __cdecl swprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...);
465 int __cdecl vswprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args);
466#endif /* __USE_MINGW_ANSI_STDIO */
467
468
469#ifndef WEOF
470#define WEOF (wint_t)(0xFFFF)
471#endif
472
473#ifdef _POSIX_
474 _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
475#else
476 _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
477#endif
478
479 wint_t __cdecl fgetwc(FILE *_File);
480 _CRTIMP wint_t __cdecl _fgetwchar(void);
481 wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
482 _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
483 wint_t __cdecl getwc(FILE *_File);
484 wint_t __cdecl getwchar(void);
485 wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
486 wint_t __cdecl putwchar(wchar_t _Ch);
487 wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
488 wchar_t *__cdecl fgetws(wchar_t * __restrict__ _Dst,int _SizeInWords,FILE * __restrict__ _File);
489 int __cdecl fputws(const wchar_t * __restrict__ _Str,FILE * __restrict__ _File);
490 _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
491 _CRTIMP int __cdecl _putws(const wchar_t *_Str);
492
493 _CRTIMP int __cdecl _scwprintf(const wchar_t * __restrict__ _Format,...);
494
495#ifndef _UCRT
496 _CRTIMP int __cdecl _swprintf_l(wchar_t * __restrict__ ,size_t _SizeInWords,const wchar_t * __restrict__ _Format,_locale_t _Locale,... ) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
497 _CRTIMP int __cdecl _swprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,...);
498 _CRTIMP int __cdecl _vswprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,va_list _ArgList);
499#endif
500
501 _CRTIMP int __cdecl _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
502 _CRTIMP int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
503
504#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
505
506#if __USE_MINGW_ANSI_STDIO == 0
507#pragma push_macro("snwprintf")
508#pragma push_macro("vsnwprintf")
509# undef snwprintf
510# undef vsnwprintf
511 int __cdecl snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...);
512 int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg);
513#pragma pop_macro ("vsnwprintf")
514#pragma pop_macro ("snwprintf")
515#endif
516
517#endif /* __NO_ISOCEXT */
518
519
520#ifdef _UCRT
521 __mingw_ovr int __cdecl _vfwscanf_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
522 {
523 return __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, _File, _Format, _Locale, _ArgList);
524 }
525
526 __mingw_ovr int __cdecl _vwscanf_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
527 {
528 return _vfwscanf_l(stdin, _Format, _Locale, _ArgList);
529 }
530
531 __mingw_ovr int __cdecl _fwscanf_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...)
532 {
533 __builtin_va_list _ArgList;
534 int _Ret;
535 __builtin_va_start(_ArgList, _Locale);
536 _Ret = _vfwscanf_l(_File, _Format, _Locale, _ArgList);
537 __builtin_va_end(_ArgList);
538 return _Ret;
539 }
540 __mingw_ovr int __cdecl _wscanf_l(const wchar_t *_Format, _locale_t _Locale, ...)
541 {
542 __builtin_va_list _ArgList;
543 int _Ret;
544 __builtin_va_start(_ArgList, _Locale);
545 _Ret = _vfwscanf_l(stdin, _Format, _Locale, _ArgList);
546 __builtin_va_end(_ArgList);
547 return _Ret;
548 }
549
550 __mingw_ovr int __cdecl _vsnwscanf_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
551 {
552 return __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, _Src, _MaxCount, _Format, _Locale, _ArgList);
553 }
554 __mingw_ovr int __cdecl _snwscanf_l(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...)
555 {
556 __builtin_va_list _ArgList;
557 int _Ret;
558 __builtin_va_start(_ArgList, _Locale);
559 _Ret = _vsnwscanf_l(_Src, _MaxCount, _Format, _Locale, _ArgList);
560 __builtin_va_end(_ArgList);
561 return _Ret;
562 }
563 __mingw_ovr int __cdecl _snwscanf(const wchar_t *_Src, size_t _MaxCount, const wchar_t *_Format, ...)
564 {
565 __builtin_va_list _ArgList;
566 int _Ret;
567 __builtin_va_start(_ArgList, _Format);
568 _Ret = _vsnwscanf_l(_Src, _MaxCount, _Format, NULL, _ArgList);
569 __builtin_va_end(_ArgList);
570 return _Ret;
571 }
572
573 __mingw_ovr int __cdecl _vswscanf_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
574 {
575 return __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, _Src, (size_t)-1, _Format, _Locale, _ArgList);
576 }
577 __mingw_ovr int __cdecl _swscanf_l(const wchar_t *_Src, const wchar_t *_Format, _locale_t _Locale, ...)
578 {
579 __builtin_va_list _ArgList;
580 int _Ret;
581 __builtin_va_start(_ArgList, _Locale);
582 _Ret = _vswscanf_l(_Src, _Format, _Locale, _ArgList);
583 __builtin_va_end(_ArgList);
584 return _Ret;
585 }
586
587 __mingw_ovr int __cdecl _vfwprintf_p_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
588 {
589 return __stdio_common_vfwprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, _Locale, _ArgList);
590 }
591 __mingw_ovr int __cdecl _vwprintf_p_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
592 {
593 return _vfwprintf_p_l(stdout, _Format, _Locale, _ArgList);
594 }
595 __mingw_ovr int __cdecl _vfwprintf_p(FILE *_File, const wchar_t *_Format, va_list _ArgList)
596 {
597 return _vfwprintf_p_l(_File, _Format, NULL, _ArgList);
598 }
599 __mingw_ovr int __cdecl _vwprintf_p(const wchar_t *_Format, va_list _ArgList)
600 {
601 return _vfwprintf_p_l(stdout, _Format, NULL, _ArgList);
602 }
603 __mingw_ovr int __cdecl _fwprintf_p_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...)
604 {
605 __builtin_va_list _ArgList;
606 int _Ret;
607 __builtin_va_start(_ArgList, _Locale);
608 _Ret = _vfwprintf_p_l(_File, _Format, _Locale, _ArgList);
609 __builtin_va_end(_ArgList);
610 return _Ret;
611 }
612 __mingw_ovr int __cdecl _wprintf_p_l(const wchar_t *_Format, _locale_t _Locale, ...)
613 {
614 __builtin_va_list _ArgList;
615 int _Ret;
616 __builtin_va_start(_ArgList, _Locale);
617 _Ret = _vfwprintf_p_l(stdout, _Format, _Locale, _ArgList);
618 __builtin_va_end(_ArgList);
619 return _Ret;
620 }
621 __mingw_ovr int __cdecl _fwprintf_p(FILE *_File, const wchar_t *_Format, ...)
622 {
623 __builtin_va_list _ArgList;
624 int _Ret;
625 __builtin_va_start(_ArgList, _Format);
626 _Ret = _vfwprintf_p_l(_File, _Format, NULL, _ArgList);
627 __builtin_va_end(_ArgList);
628 return _Ret;
629 }
630 __mingw_ovr int __cdecl _wprintf_p(const wchar_t *_Format, ...)
631 {
632 __builtin_va_list _ArgList;
633 int _Ret;
634 __builtin_va_start(_ArgList, _Format);
635 _Ret = _vfwprintf_p_l(stdout, _Format, NULL, _ArgList);
636 __builtin_va_end(_ArgList);
637 return _Ret;
638 }
639
640 __mingw_ovr int __cdecl _vfwprintf_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
641 {
642 return __stdio_common_vfwprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, _Locale, _ArgList);
643 }
644 __mingw_ovr int __cdecl _vwprintf_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
645 {
646 return _vfwprintf_l(stdout, _Format, _Locale, _ArgList);
647 }
648 __mingw_ovr int __cdecl _fwprintf_l(FILE *_File, const wchar_t *_Format, _locale_t _Locale, ...)
649 {
650 __builtin_va_list _ArgList;
651 int _Ret;
652 __builtin_va_start(_ArgList, _Locale);
653 _Ret = _vfwprintf_l(_File, _Format, _Locale, _ArgList);
654 __builtin_va_end(_ArgList);
655 return _Ret;
656 }
657 __mingw_ovr int __cdecl _wprintf_l(const wchar_t *_Format, _locale_t _Locale, ...)
658 {
659 __builtin_va_list _ArgList;
660 int _Ret;
661 __builtin_va_start(_ArgList, _Locale);
662 _Ret = _vfwprintf_l(stdout, _Format, _Locale, _ArgList);
663 __builtin_va_end(_ArgList);
664 return _Ret;
665 }
666
667 __mingw_ovr int __cdecl _vswprintf_p_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
668 {
669 return __stdio_common_vswprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _DstBuf, _MaxCount, _Format, _Locale, _ArgList);
670 }
671 __mingw_ovr int __cdecl _vswprintf_p(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, va_list _ArgList)
672 {
673 return _vswprintf_p_l(_DstBuf, _MaxCount, _Format, NULL, _ArgList);
674 }
675 __mingw_ovr int __cdecl _swprintf_p_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...)
676 {
677 __builtin_va_list _ArgList;
678 int _Ret;
679 __builtin_va_start(_ArgList, _Locale);
680 _Ret = _vswprintf_p_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList);
681 __builtin_va_end(_ArgList);
682 return _Ret;
683 }
684 __mingw_ovr int __cdecl _swprintf_p(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, ...)
685 {
686 __builtin_va_list _ArgList;
687 int _Ret;
688 __builtin_va_start(_ArgList, _Format);
689 _Ret = _vswprintf_p_l(_DstBuf, _MaxCount, _Format, NULL, _ArgList);
690 __builtin_va_end(_ArgList);
691 return _Ret;
692 }
693
694 __mingw_ovr int __cdecl _vsnwprintf_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
695 {
696 return __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _DstBuf, _MaxCount, _Format, _Locale, _ArgList);
697 }
698 __mingw_ovr int __cdecl _snwprintf_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...)
699 {
700 __builtin_va_list _ArgList;
701 int _Ret;
702 __builtin_va_start(_ArgList, _Locale);
703 _Ret = _vsnwprintf_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList);
704 __builtin_va_end(_ArgList);
705 return _Ret;
706 }
707
708 __mingw_ovr int __cdecl _vscwprintf_p_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
709 {
710 return __stdio_common_vswprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, _Locale, _ArgList);
711 }
712 __mingw_ovr int __cdecl _vscwprintf_p(const wchar_t *_Format, va_list _ArgList)
713 {
714 return _vscwprintf_p_l(_Format, NULL, _ArgList);
715 }
716 __mingw_ovr int __cdecl _scwprintf_p_l(const wchar_t *_Format, _locale_t _Locale, ...)
717 {
718 __builtin_va_list _ArgList;
719 int _Ret;
720 __builtin_va_start(_ArgList, _Locale);
721 _Ret = _vscwprintf_p_l(_Format, _Locale, _ArgList);
722 __builtin_va_end(_ArgList);
723 return _Ret;
724 }
725 __mingw_ovr int __cdecl _scwprintf_p(const wchar_t *_Format, ...)
726 {
727 __builtin_va_list _ArgList;
728 int _Ret;
729 __builtin_va_start(_ArgList, _Format);
730 _Ret = _vscwprintf_p_l(_Format, NULL, _ArgList);
731 __builtin_va_end(_ArgList);
732 return _Ret;
733 }
734
735 __mingw_ovr int __cdecl _vscwprintf_l(const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
736 {
737 return __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, _Locale, _ArgList);
738 }
739
740 _CRTIMP int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
741
742 __mingw_ovr int __cdecl _scwprintf_l(const wchar_t *_Format, _locale_t _Locale, ...)
743 {
744 __builtin_va_list _ArgList;
745 int _Ret;
746 __builtin_va_start(_ArgList, _Locale);
747 _Ret = _vscwprintf_l(_Format, _Locale, _ArgList);
748 __builtin_va_end(_ArgList);
749 return _Ret;
750 }
751
752 __mingw_ovr int __cdecl _vswprintf_c_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
753 {
754 return __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _DstBuf, _MaxCount, _Format, _Locale, _ArgList);
755 }
756 __mingw_ovr int __cdecl __vswprintf_l(wchar_t *_DstBuf, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
757 {
758 return _vswprintf_c_l(_DstBuf, (size_t)-1, _Format, _Locale, _ArgList);
759 }
760 __mingw_ovr int __cdecl _vswprintf_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, va_list _ArgList)
761 {
762 return _vswprintf_c_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList);
763 }
764 _CRTIMP int __cdecl _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args);
765 __mingw_ovr int __cdecl _swprintf_c_l(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, _locale_t _Locale, ...)
766 {
767 __builtin_va_list _ArgList;
768 int _Ret;
769 __builtin_va_start(_ArgList, _Locale);
770 _Ret = _vswprintf_c_l(_DstBuf, _MaxCount, _Format, _Locale, _ArgList);
771 __builtin_va_end(_ArgList);
772 return _Ret;
773 }
774 __mingw_ovr int __cdecl __swprintf_l(wchar_t *_DstBuf, const wchar_t *_Format, _locale_t _Locale, ...)
775 {
776 __builtin_va_list _ArgList;
777 int _Ret;
778 __builtin_va_start(_ArgList, _Locale);
779 _Ret = _vswprintf_c_l(_DstBuf, (size_t)-1, _Format, _Locale, _ArgList);
780 __builtin_va_end(_ArgList);
781 return _Ret;
782 }
783 _CRTIMP int __cdecl _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...);
784#else /* _UCRT */
785 _CRTIMP int __cdecl _fwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
786 _CRTIMP int __cdecl _wprintf_p(const wchar_t * __restrict__ _Format,...);
787 _CRTIMP int __cdecl _vfwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
788 _CRTIMP int __cdecl _vwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList);
789 _CRTIMP int __cdecl _swprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,...);
790 _SECIMP int __cdecl _vswprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,va_list _ArgList);
791 _CRTIMP int __cdecl _scwprintf_p(const wchar_t * __restrict__ _Format,...);
792 _SECIMP int __cdecl _vscwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList);
793 _CRTIMP int __cdecl _wprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
794 _CRTIMP int __cdecl _wprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
795 _CRTIMP int __cdecl _vwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
796 _CRTIMP int __cdecl _vwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
797 _CRTIMP int __cdecl _fwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
798 _CRTIMP int __cdecl _fwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
799 _CRTIMP int __cdecl _vfwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
800 _CRTIMP int __cdecl _vfwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
801 _CRTIMP int __cdecl _swprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
802 _CRTIMP int __cdecl _swprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
803 _CRTIMP int __cdecl _vswprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
804 _CRTIMP int __cdecl _vswprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
805 _CRTIMP int __cdecl _scwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
806 _CRTIMP int __cdecl _scwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
807 _CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
808 _CRTIMP int __cdecl _snwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
809 _CRTIMP int __cdecl _vsnwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
810 _CRTIMP int __cdecl _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...);
811 _CRTIMP int __cdecl _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args);
812 _CRTIMP int __cdecl __swprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
813 _CRTIMP int __cdecl _vswprintf_l(wchar_t * __restrict__ _Dest,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
814 _CRTIMP int __cdecl __vswprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
815#endif /* !_UCRT */
816
817#ifndef RC_INVOKED
818#include <swprintf.inl>
819#endif
820
821#ifdef _CRT_NON_CONFORMING_SWPRINTFS
822#ifndef __cplusplus
823#define _swprintf_l __swprintf_l
824#define _vswprintf_l __vswprintf_l
825#endif
826#endif
827
828#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
829#pragma push_macro("_wtempnam")
830#undef _wtempnam
831#endif
832 _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
833#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
834#pragma pop_macro("_wtempnam")
835#endif
836
837#ifndef _UCRT
838 _CRTIMP int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
839 _CRTIMP int __cdecl _vscwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
840 _CRTIMP int __cdecl _fwscanf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
841 _CRTIMP int __cdecl _swscanf_l(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
842 _CRTIMP int __cdecl _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...);
843 _CRTIMP int __cdecl _snwscanf_l(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
844 _CRTIMP int __cdecl _wscanf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
845#endif /* !_UCRT */
846 _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
847 _CRTIMP FILE *__cdecl _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
848 _CRTIMP FILE *__cdecl _wfreopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
849
850#ifndef _CRT_WPERROR_DEFINED
851#define _CRT_WPERROR_DEFINED
852 _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
853#endif
854 _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
855#if !defined(NO_OLDNAMES) && !defined(wpopen)
856#define wpopen _wpopen
857#endif
858 _CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
859 _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
860#if __MSVCRT_VERSION__ >= 0x800
861 _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
862 _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
863 _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
864#endif
865
866#undef _CRT_GETPUTWCHAR_NOINLINE
867
868#if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE) || defined (__CRT__NO_INLINE)
869#define getwchar() fgetwc(stdin)
870#define putwchar(_c) fputwc((_c),stdout)
871#else
872 __CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); }
873 __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) {return (fputwc(_C,stdout)); }
874#endif
875
876#define getwc(_stm) fgetwc(_stm)
877#define putwc(_c,_stm) fputwc(_c,_stm)
878#if __MSVCRT_VERSION__ >= 0x800
879#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
880#define _getwc_nolock(_c) _fgetwc_nolock(_c)
881#endif
882
883#endif /* _WSTDIO_DEFINED */
884
885#ifndef _WSTDLIB_DEFINED
886#define _WSTDLIB_DEFINED
887
888 _CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
889 _CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
890 _CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
891 _CRTIMP double __cdecl _wcstod_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,_locale_t _Locale);
892
893 double __cdecl __mingw_wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr);
894 float __cdecl __mingw_wcstof(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr);
895 long double __cdecl __mingw_wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__);
896
897#if defined(__USE_MINGW_STRTOX) && !defined(_UCRT)
898 __mingw_ovr
899 double __cdecl wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr){
900 return __mingw_wcstod(_Str,_EndPtr);
901 }
902 __mingw_ovr
903 float __cdecl wcstof(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr){
904 return __mingw_wcstof(_Str,_EndPtr);
905 }
906 /* wcstold is already a mingw implementation */
907#else
908 double __cdecl wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr);
909 float __cdecl wcstof(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr);
910#endif /* !defined(__USE_MINGW_STRTOX) || defined(_UCRT) */
911#if !defined __NO_ISOCEXT /* in libmingwex.a */
912 long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
913#endif /* __NO_ISOCEXT */
914 long __cdecl wcstol(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix);
915 _CRTIMP long __cdecl _wcstol_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale);
916 unsigned long __cdecl wcstoul(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix);
917 _CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale);
918 _CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
919#ifndef _CRT_WSYSTEM_DEFINED
920#define _CRT_WSYSTEM_DEFINED
921 _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
922#endif
923 _CRTIMP double __cdecl _wtof(const wchar_t *_Str);
924 _CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
925 _CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
926 _CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
927 _CRTIMP long __cdecl _wtol(const wchar_t *_Str);
928 _CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
929
930 __MINGW_EXTENSION _CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
931 __MINGW_EXTENSION _CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
932 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
933 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
934 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
935 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
936 __MINGW_EXTENSION _CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
937 __MINGW_EXTENSION _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
938#endif
939
940#ifndef _POSIX_
941#ifndef _WSTDLIBP_DEFINED
942#define _WSTDLIBP_DEFINED
943#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
944#pragma push_macro("_wfullpath")
945#undef _wfullpath
946#endif
947 _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
948#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
949#pragma pop_macro("_wfullpath")
950#endif
951 _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
952#ifndef _CRT_WPERROR_DEFINED
953#define _CRT_WPERROR_DEFINED
954 _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
955#endif
956 _CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
957 _CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
958 _CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
959#endif
960#endif
961
962#ifndef _WSTRING_DEFINED
963#define _WSTRING_DEFINED
964#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
965#pragma push_macro("_wcsdup")
966#undef _wcsdup
967#endif
968 _CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str);
969#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
970#pragma pop_macro("_wcsdup")
971#endif
972 wchar_t *__cdecl wcscat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
973 _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
974 int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
975 wchar_t *__cdecl wcscpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
976 size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
977 size_t __cdecl wcslen(const wchar_t *_Str);
978 size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
979 wchar_t *__cdecl wcsncat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
980 int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
981 wchar_t *__cdecl wcsncpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
982 wchar_t *__cdecl _wcsncpy_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count,_locale_t _Locale) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
983 _CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
984 _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
985 size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
986 _CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
987 _CRTIMP wchar_t *__cdecl wcstok(wchar_t * __restrict__ _Str,const wchar_t * __restrict__ _Delim,wchar_t ** __restrict__ _Ptr) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
988 _CRTIMP wchar_t *__cdecl _wcstok(wchar_t * __restrict__ _Str,const wchar_t * __restrict__ _Delim) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
989#if defined(_CRT_NON_CONFORMING_WCSTOK) && !defined(__cplusplus)
990 #define wcstok _wcstok
991#endif
992#if !defined(_CRT_NO_INLINE_DEPRECATED_WCSTOK) && defined(__cplusplus)
993 extern "C++" inline wchar_t *__cdecl wcstok(wchar_t * __restrict__ _Str,const wchar_t * __restrict__ _Delim) { return _wcstok(_Str, _Delim); }
994#endif
995 _CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
996 _CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
997 _CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
998 _CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
999 _CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
1000 _CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
1001 _CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1002 _CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str);
1003 _CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1004 _CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1005 _CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1006 _CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1007 _CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1008 _CRTIMP size_t __cdecl wcsxfrm(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount);
1009 _CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount,_locale_t _Locale);
1010 _CRTIMP int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2);
1011 _CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
1012 _CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
1013 _CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
1014 _CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
1015 _CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
1016 _CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
1017 _CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
1018
1019#ifndef NO_OLDNAMES
1020#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
1021#pragma push_macro("wcsdup")
1022#undef wcsdup
1023#endif
1024 wchar_t *__cdecl wcsdup(const wchar_t *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
1025#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
1026#pragma pop_macro("wcsdup")
1027#endif
1028#define wcswcs wcsstr
1029 int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
1030 int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
1031 wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
1032 wchar_t *__cdecl wcsrev(wchar_t *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
1033 wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
1034 wchar_t *__cdecl wcslwr(wchar_t *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
1035 wchar_t *__cdecl wcsupr(wchar_t *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
1036 int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
1037#endif
1038#endif
1039
1040#ifndef _TM_DEFINED
1041#define _TM_DEFINED
1042 struct tm {
1043 int tm_sec;
1044 int tm_min;
1045 int tm_hour;
1046 int tm_mday;
1047 int tm_mon;
1048 int tm_year;
1049 int tm_wday;
1050 int tm_yday;
1051 int tm_isdst;
1052 };
1053#endif
1054
1055#ifndef _WTIME_DEFINED
1056#define _WTIME_DEFINED
1057
1058 _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
1059 _SECIMP errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
1060 wchar_t *__cdecl _wctime32(const __time32_t *_Time) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1061 _SECIMP errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
1062 size_t __cdecl wcsftime(wchar_t * __restrict__ _Buf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,const struct tm * __restrict__ _Tm);
1063 _CRTIMP size_t __cdecl _wcsftime_l(wchar_t * __restrict__ _Buf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,const struct tm * __restrict__ _Tm,_locale_t _Locale);
1064 _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1065 _SECIMP errno_t __cdecl _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords);
1066 _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1067 _SECIMP errno_t __cdecl _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords);
1068 _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1069 _SECIMP errno_t __cdecl _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
1070
1071#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
1072#define _INC_WTIME_INL
1073#ifndef _USE_32BIT_TIME_T
1074 wchar_t *__cdecl _wctime(const time_t *_Time) __MINGW_ASM_CALL(_wctime64) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1075#else
1076 wchar_t *__cdecl _wctime(const time_t *_Time) __MINGW_ASM_CALL(_wctime32) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1077#endif
1078#endif
1079
1080#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
1081#define _INC_WTIME_S_INL
1082#ifndef _USE_32BIT_TIME_T
1083 errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) __MINGW_ASM_CALL(_wctime64_s);
1084#else
1085 errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) __MINGW_ASM_CALL(_wctime32_s);
1086#endif
1087#endif
1088
1089#endif
1090
1091#if defined(_UCRT) || defined(__LARGE_MBSTATE_T)
1092 typedef struct _Mbstatet {
1093 unsigned long _Wchar;
1094 unsigned short _Byte, _State;
1095 } _Mbstatet;
1096 typedef _Mbstatet mbstate_t;
1097#else
1098 typedef int mbstate_t;
1099#endif
1100 typedef wchar_t _Wint_t;
1101
1102 _CRTIMP wint_t __cdecl btowc(int);
1103 int __cdecl mbsinit(const mbstate_t *ps);
1104 _CRTIMP size_t __cdecl mbrlen(const char * __restrict__ _Ch,size_t _SizeInBytes,mbstate_t * __restrict__ _State);
1105 _CRTIMP size_t __cdecl mbrtowc(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SizeInBytes,mbstate_t * __restrict__ _State);
1106 _CRTIMP size_t __cdecl mbsrtowcs(wchar_t * __restrict__ _Dest,const char ** __restrict__ _PSrc,size_t _Count,mbstate_t * __restrict__ _State) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1107 _CRTIMP size_t __cdecl wcrtomb(char * __restrict__ _Dest,wchar_t _Source,mbstate_t * __restrict__ _State) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1108 _CRTIMP size_t __cdecl wcsrtombs(char * __restrict__ _Dest,const wchar_t ** __restrict__ _PSource,size_t _Count,mbstate_t * __restrict__ _State) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1109 _CRTIMP int __cdecl wctob(wint_t _WCh);
1110
1111#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
1112 wchar_t *__cdecl wmemset(wchar_t *s, wchar_t c, size_t n);
1113 _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *s, wchar_t c, size_t n);
1114 int __cdecl wmemcmp(const wchar_t *s1, const wchar_t *s2,size_t n);
1115 wchar_t *__cdecl wmemcpy(wchar_t * __restrict__ s1,const wchar_t * __restrict__ s2,size_t n) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1116 wchar_t * __cdecl wmempcpy (wchar_t *_Dst, const wchar_t *_Src, size_t _Size);
1117 wchar_t *__cdecl wmemmove(wchar_t *s1, const wchar_t *s2, size_t n) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1118 int __cdecl fwide(FILE *stream,int mode);
1119 __MINGW_EXTENSION long long __cdecl wcstoll(const wchar_t * __restrict__ nptr,wchar_t ** __restrict__ endptr, int base);
1120 __MINGW_EXTENSION unsigned long long __cdecl wcstoull(const wchar_t * __restrict__ nptr,wchar_t ** __restrict__ endptr, int base);
1121#endif /* __NO_ISOCEXT */
1122
1123 void *__cdecl memmove(void *_Dst,const void *_Src,size_t _MaxCount);
1124 void *__cdecl memcpy(void * __restrict__ _Dst,const void * __restrict__ _Src,size_t _MaxCount) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
1125#ifndef __CRT__NO_INLINE
1126 __CRT_INLINE int __cdecl fwide(FILE *_F,int _M) { (void)_F; return (_M); }
1127 __CRT_INLINE _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *_S,wchar_t _C,size_t _N) {
1128 if (_S) {
1129 for ( ; 0 < _N; ++_S, --_N)
1130 if (*_S == _C)
1131 return (_CONST_RETURN wchar_t *)(_S);
1132 }
1133 return (_CONST_RETURN wchar_t *) NULL;
1134 }
1135 __CRT_INLINE int __cdecl wmemcmp(const wchar_t *_S1,const wchar_t *_S2,size_t _N) {
1136 if (_N == 0 || _S1 == _S2)
1137 return 0; /* even for NULL pointers. */
1138 if ((_S1 && !(_S2)) || (_S2 && !(_S1)))
1139 return !(_S2) ? 1 : -1; /* robust. */
1140 for ( ; 0 < _N; ++_S1, ++_S2, --_N)
1141 if (*_S1 != *_S2)
1142 return (*_S1 < *_S2 ? -1 : +1);
1143 return 0;
1144 }
1145 __CRT_INLINE wchar_t *__cdecl wmemcpy(wchar_t * __restrict__ _S1,const wchar_t * __restrict__ _S2,size_t _N)
1146 {
1147 return (wchar_t *) memcpy (_S1,_S2,_N*sizeof(wchar_t));
1148 }
1149 __CRT_INLINE wchar_t *__cdecl wmemmove(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memmove(_S1,_S2,_N*sizeof(wchar_t)); }
1150 __CRT_INLINE wchar_t *__cdecl wmemset(wchar_t *_S,wchar_t _C,size_t _N) {
1151 wchar_t *_Su = _S;
1152 for (;0<_N;++_Su,--_N) {
1153 *_Su = _C;
1154 }
1155 return (_S);
1156 }
1157#endif /* !__CRT__NO_INLINE */
1158
1159#ifndef __MINGW_MBWC_CONVERT_DEFINED
1160#define __MINGW_MBWC_CONVERT_DEFINED
1161
1162/**
1163 * __mingw_str_wide_utf8
1164 * Converts a null terminated UCS-2 string to a multibyte (UTF-8) equivalent.
1165 * Caller is supposed to free allocated buffer with __mingw_str_free().
1166 * @param[in] wptr Pointer to wide string.
1167 * @param[out] mbptr Pointer to multibyte string.
1168 * @param[out] buflen Optional parameter for length of allocated buffer.
1169 * @return bytes written by WideCharToMultiByte conversion, 0 for failure.
1170 *
1171 * WideCharToMultiByte - http://msdn.microsoft.com/en-us/library/dd374130(VS.85).aspx
1172 */
1173int __cdecl __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen);
1174
1175/**
1176 * __mingw_str_utf8_wide
1177 * Converts a null terminated UTF-8 string to a UCS-2 equivalent.
1178 * Caller is supposed to free allocated buffer with __mingw_str_free().
1179 * @param[out] mbptr Pointer to multibyte string.
1180 * @param[in] wptr Pointer to wide string.
1181 * @param[out] buflen Optional parameter for length of allocated buffer.
1182 * @return bytes written by WideCharToMultiByte conversion, 0 for failure.
1183 *
1184 * MultiByteToWideChar - http://msdn.microsoft.com/en-us/library/dd319072(VS.85).aspx
1185 */
1186
1187int __cdecl __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen);
1188
1189/**
1190 * __mingw_str_free
1191 * Frees buffer create by __mingw_str_wide_utf8 and __mingw_str_utf8_wide.
1192 * @param[in] ptr memory block to free.
1193 *
1194 */
1195
1196void __cdecl __mingw_str_free(void *ptr);
1197
1198#endif /* __MINGW_MBWC_CONVERT_DEFINED */
1199
1200#ifdef __cplusplus
1201}
1202#endif
1203
1204#pragma pack(pop)
1205
1206#include <sec_api/wchar_s.h>
1207
1208#endif /* _INC_WCHAR */
1209