1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #ifndef _INC_WCHAR
7 #define _INC_WCHAR
8
9 #include <corecrt.h>
10
11 #define __need___va_list
12 #include <stdarg.h>
13
14 #define __CORRECT_ISO_CPP_WCHAR_H_PROTO // For stl
15
16 #pragma pack(push,_CRT_PACKING)
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 #ifdef _MSC_VER
23 #pragma warning(push)
24 #pragma warning(disable:4820)
25 #endif
26
27 #ifndef WCHAR_MIN
28 #define WCHAR_MIN 0
29 #endif
30 #ifndef WCHAR_MAX
31 #define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
32 #endif
33
34 #ifndef WEOF
35 #define WEOF (wint_t)(0xFFFF)
36 #endif
37
38 #ifndef _FILE_DEFINED
39 struct _iobuf {
40 char *_ptr;
41 int _cnt;
42 char *_base;
43 int _flag;
44 int _file;
45 int _charbuf;
46 int _bufsiz;
47 char *_tmpfname;
48 };
49 typedef struct _iobuf FILE;
50 #define _FILE_DEFINED
51 #endif
52
53 #ifndef _STDIO_DEFINED
54 _CRTIMP FILE *__cdecl __iob_func(void);
55 _CRTDATA(extern FILE _iob[];)
56 #ifdef _M_CEE_PURE
57 #define _iob __iob_func()
58 #endif
59 #endif
60
61 #ifndef _STDSTREAM_DEFINED
62 #define _STDSTREAM_DEFINED
63 #define stdin (&_iob[0])
64 #define stdout (&_iob[1])
65 #define stderr (&_iob[2])
66 #endif /* !_STDSTREAM_DEFINED */
67
68 #ifndef _FSIZE_T_DEFINED
69 typedef unsigned long _fsize_t;
70 #define _FSIZE_T_DEFINED
71 #endif
72
73 #ifndef _WFINDDATA_T_DEFINED
74 struct _wfinddata_t {
75 unsigned attrib;
76 time_t time_create;
77 time_t time_access;
78 time_t time_write;
79 _fsize_t size;
80 wchar_t name[260];
81 };
82
83 struct _wfinddata32_t {
84 unsigned attrib;
85 __time32_t time_create;
86 __time32_t time_access;
87 __time32_t time_write;
88 _fsize_t size;
89 wchar_t name[260];
90 };
91
92 #if _INTEGRAL_MAX_BITS >= 64
93 struct _wfinddatai64_t {
94 unsigned attrib;
95 time_t time_create;
96 time_t time_access;
97 time_t time_write;
98 __MINGW_EXTENSION __int64 size;
99 wchar_t name[260];
100 };
101
102 struct _wfinddata32i64_t {
103 unsigned attrib;
104 __time32_t time_create;
105 __time32_t time_access;
106 __time32_t time_write;
107 __MINGW_EXTENSION __int64 size;
108 wchar_t name[260];
109 };
110
111 struct _wfinddata64i32_t {
112 unsigned attrib;
113 __time64_t time_create;
114 __time64_t time_access;
115 __time64_t time_write;
116 _fsize_t size;
117 wchar_t name[260];
118 };
119
120 struct _wfinddata64_t {
121 unsigned attrib;
122 __time64_t time_create;
123 __time64_t time_access;
124 __time64_t time_write;
125 __MINGW_EXTENSION __int64 size;
126 wchar_t name[260];
127 };
128 #endif
129
130 #define _WFINDDATA_T_DEFINED
131 #endif /* !_WFINDDATA_T_DEFINED */
132
133 #ifndef _CRT_CTYPEDATA_DEFINED
134 # define _CRT_CTYPEDATA_DEFINED
135 # ifndef _CTYPE_DISABLE_MACROS
136 # ifndef __PCTYPE_FUNC
137 # ifdef _DLL
138 # define __PCTYPE_FUNC __pctype_func()
139 # else
140 # define __PCTYPE_FUNC _pctype
141 # endif
142 # endif /* !__PCTYPE_FUNC */
143 _CRTIMP const unsigned short * __cdecl __pctype_func(void);
144 # ifndef _M_CEE_PURE
145 _CRTDATA(extern unsigned short *_pctype);
146 # else
147 # define _pctype (__pctype_func())
148 # endif /* !_M_CEE_PURE */
149 # endif /* !_CTYPE_DISABLE_MACROS */
150 #endif /* !_CRT_CTYPEDATA_DEFINED */
151
152 #ifndef _CRT_WCTYPEDATA_DEFINED
153 #define _CRT_WCTYPEDATA_DEFINED
154 # ifndef _CTYPE_DISABLE_MACROS
155 _CRTDATA(extern unsigned short *_wctype);
156 _CRTIMP const wctype_t * __cdecl __pwctype_func(void);
157 # ifndef _M_CEE_PURE
158 _CRTDATA(extern const wctype_t *_pwctype);
159 # else
160 # define _pwctype (__pwctype_func())
161 # endif /* !_M_CEE_PURE */
162 # endif /* !_CTYPE_DISABLE_MACROS */
163 #endif /* !_CRT_WCTYPEDATA_DEFINED */
164
165 #define _UPPER 0x1
166 #define _LOWER 0x2
167 #define _DIGIT 0x4
168 #define _SPACE 0x8
169
170 #define _PUNCT 0x10
171 #define _CONTROL 0x20
172 #define _BLANK 0x40
173 #define _HEX 0x80
174
175 #define _LEADBYTE 0x8000
176 #define _ALPHA (0x0100|_UPPER|_LOWER)
177
178 #ifndef _WCTYPE_DEFINED
179 #define _WCTYPE_DEFINED
180 _Check_return_ _CRTIMP int __cdecl iswalpha(_In_ wint_t _C);
181 _Check_return_ _CRTIMP int __cdecl _iswalpha_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
182 _Check_return_ _CRTIMP int __cdecl iswupper(_In_ wint_t _C);
183 _Check_return_ _CRTIMP int __cdecl _iswupper_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
184 _Check_return_ _CRTIMP int __cdecl iswlower(_In_ wint_t _C);
185 _Check_return_ _CRTIMP int __cdecl _iswlower_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
186 _Check_return_ _CRTIMP int __cdecl iswdigit(_In_ wint_t _C);
187 _Check_return_ _CRTIMP int __cdecl _iswdigit_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
188 _Check_return_ _CRTIMP int __cdecl iswxdigit(_In_ wint_t _C);
189 _Check_return_ _CRTIMP int __cdecl _iswxdigit_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
190 _Check_return_ _CRTIMP int __cdecl iswspace(_In_ wint_t _C);
191 _Check_return_ _CRTIMP int __cdecl _iswspace_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
192 _Check_return_ _CRTIMP int __cdecl iswpunct(_In_ wint_t _C);
193 _Check_return_ _CRTIMP int __cdecl _iswpunct_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
194 _Check_return_ _CRTIMP int __cdecl iswalnum(_In_ wint_t _C);
195 _Check_return_ _CRTIMP int __cdecl _iswalnum_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
196 _Check_return_ _CRTIMP int __cdecl iswprint(_In_ wint_t _C);
197 _Check_return_ _CRTIMP int __cdecl _iswprint_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
198 _Check_return_ _CRTIMP int __cdecl iswgraph(_In_ wint_t _C);
199 _Check_return_ _CRTIMP int __cdecl _iswgraph_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
200 _Check_return_ _CRTIMP int __cdecl iswcntrl(_In_ wint_t _C);
201 _Check_return_ _CRTIMP int __cdecl _iswcntrl_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
202 _Check_return_ _CRTIMP int __cdecl iswascii(_In_ wint_t _C);
203 _Check_return_ _CRTIMP int __cdecl isleadbyte(_In_ int _C);
204 _Check_return_ _CRTIMP int __cdecl _isleadbyte_l(_In_ int _C, _In_opt_ _locale_t _Locale);
205 _Check_return_ _CRTIMP wint_t __cdecl towupper(_In_ wint_t _C);
206 _Check_return_ _CRTIMP wint_t __cdecl _towupper_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
207 _Check_return_ _CRTIMP wint_t __cdecl towlower(_In_ wint_t _C);
208 _Check_return_ _CRTIMP wint_t __cdecl _towlower_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
209 _Check_return_ _CRTIMP int __cdecl iswctype(_In_ wint_t _C, _In_ wctype_t _Type);
210 _Check_return_ _CRTIMP int __cdecl _iswctype_l(_In_ wint_t _C, _In_ wctype_t _Type, _In_opt_ _locale_t _Locale);
211 _Check_return_ _CRTIMP int __cdecl __iswcsymf(_In_ wint_t _C);
212 _Check_return_ _CRTIMP int __cdecl _iswcsymf_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
213 _Check_return_ _CRTIMP int __cdecl __iswcsym(_In_ wint_t _C);
214 _Check_return_ _CRTIMP int __cdecl _iswcsym_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
215 _CRTIMP int __cdecl is_wctype(_In_ wint_t _C, _In_ wctype_t _Type);
216
217 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
218 _CRTIMP int __cdecl iswblank(wint_t _C);
219 #endif
220 #endif
221
222 #ifndef _WDIRECT_DEFINED
223 #define _WDIRECT_DEFINED
224
225 _Check_return_
226 _Ret_opt_z_
227 _CRTIMP
228 wchar_t*
229 __cdecl
230 _wgetcwd(
231 _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf,
232 _In_ int _SizeInWords);
233
234 _Check_return_
235 _Ret_opt_z_
236 _CRTIMP
237 wchar_t*
238 __cdecl
239 _wgetdcwd(
240 _In_ int _Drive,
241 _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf,
242 _In_ int _SizeInWords);
243
244 _Check_return_
245 _Ret_opt_z_
246 wchar_t*
247 __cdecl
248 _wgetdcwd_nolock(
249 _In_ int _Drive,
250 _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf,
251 _In_ int _SizeInWords);
252
253 _Check_return_
254 _CRTIMP
255 int
256 __cdecl
257 _wchdir(
258 _In_z_ const wchar_t *_Path);
259
260 _Check_return_
261 _CRTIMP
262 int
263 __cdecl
264 _wmkdir(
265 _In_z_ const wchar_t *_Path);
266
267 _Check_return_
268 _CRTIMP
269 int
270 __cdecl
271 _wrmdir(
272 _In_z_ const wchar_t *_Path);
273
274 #endif /* _WDIRECT_DEFINED */
275
276 #ifndef _WIO_DEFINED
277 #define _WIO_DEFINED
278
279 _Check_return_
280 _CRTIMP
281 int
282 __cdecl
283 _waccess(
284 _In_z_ const wchar_t *_Filename,
285 _In_ int _AccessMode);
286
287 _Check_return_
288 _CRTIMP
289 int
290 __cdecl
291 _wchmod(
292 _In_z_ const wchar_t *_Filename,
293 _In_ int _Mode);
294
295 _Check_return_
296 _CRTIMP
297 int
298 __cdecl
299 _wcreat(
300 _In_z_ const wchar_t *_Filename,
301 _In_ int _PermissionMode);
302
303 _Check_return_
304 _CRTIMP
305 intptr_t
306 __cdecl
307 _wfindfirst32(
308 _In_z_ const wchar_t *_Filename,
309 _Out_ struct _wfinddata32_t *_FindData);
310
311 _Check_return_
312 _CRTIMP
313 int
314 __cdecl
315 _wfindnext32(
316 _In_ intptr_t _FindHandle,
317 _Out_ struct _wfinddata32_t *_FindData);
318
319 _Check_return_
320 _CRTIMP
321 int
322 __cdecl
323 _wunlink(
324 _In_z_ const wchar_t *_Filename);
325
326 _Check_return_
327 _CRTIMP
328 int
329 __cdecl
330 _wrename(
331 _In_z_ const wchar_t *_OldFilename,
332 _In_z_ const wchar_t *_NewFilename);
333
334 _CRTIMP
335 wchar_t*
336 __cdecl
337 _wmktemp(
338 _Inout_z_ wchar_t *_TemplateName);
339
340 #if _INTEGRAL_MAX_BITS >= 64
341
342 _Check_return_
343 _CRTIMP
344 intptr_t
345 __cdecl
346 _wfindfirst32i64(
347 _In_z_ const wchar_t *_Filename,
348 _Out_ struct _wfinddata32i64_t *_FindData);
349
350 _Check_return_
351 _CRTIMP
352 intptr_t
353 __cdecl
354 _wfindfirst64i32(
355 _In_z_ const wchar_t *_Filename,
356 _Out_ struct _wfinddata64i32_t *_FindData);
357
358 _Check_return_
359 _CRTIMP
360 intptr_t
361 __cdecl
362 _wfindfirst64(
363 _In_z_ const wchar_t *_Filename,
364 _Out_ struct _wfinddata64_t *_FindData);
365
366 _Check_return_
367 _CRTIMP
368 int
369 __cdecl
370 _wfindnext32i64(
371 _In_ intptr_t _FindHandle,
372 _Out_ struct _wfinddata32i64_t *_FindData);
373
374 _Check_return_
375 _CRTIMP
376 int
377 __cdecl
378 _wfindnext64i32(
379 _In_ intptr_t _FindHandle,
380 _Out_ struct _wfinddata64i32_t *_FindData);
381
382 _Check_return_
383 _CRTIMP
384 int
385 __cdecl
386 _wfindnext64(
387 _In_ intptr_t _FindHandle,
388 _Out_ struct _wfinddata64_t *_FindData);
389
390 #endif /* _INTEGRAL_MAX_BITS >= 64 */
391
392 _Check_return_wat_
393 _CRTIMP
394 errno_t
395 __cdecl
396 _wsopen_s(
397 _Out_ int *_FileHandle,
398 _In_z_ const wchar_t *_Filename,
399 _In_ int _OpenFlag,
400 _In_ int _ShareFlag,
401 _In_ int _PermissionFlag);
402
403 #if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
404 _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
405 _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
406 #else
407 extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
408 extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
409 #endif
410
411 #endif /* !_WIO_DEFINED */
412
413 #ifndef _WLOCALE_DEFINED
414 #define _WLOCALE_DEFINED
415 _Check_return_opt_
416 _CRTIMP
417 wchar_t*
418 __cdecl
419 _wsetlocale(
420 _In_ int _Category,
421 _In_opt_z_ const wchar_t *_Locale);
422 #endif
423
424 #ifndef _WPROCESS_DEFINED
425 #define _WPROCESS_DEFINED
426
427 _CRTIMP
428 intptr_t
429 __cdecl
430 _wexecl(
431 _In_z_ const wchar_t *_Filename,
432 _In_z_ const wchar_t *_ArgList,
433 ...);
434
435 _CRTIMP
436 intptr_t
437 __cdecl
438 _wexecle(
439 _In_z_ const wchar_t *_Filename,
440 _In_z_ const wchar_t *_ArgList,
441 ...);
442
443 _CRTIMP
444 intptr_t
445 __cdecl
446 _wexeclp(
447 _In_z_ const wchar_t *_Filename,
448 _In_z_ const wchar_t *_ArgList,
449 ...);
450
451 _CRTIMP
452 intptr_t
453 __cdecl
454 _wexeclpe(
455 _In_z_ const wchar_t *_Filename,
456 _In_z_ const wchar_t *_ArgList,
457 ...);
458
459 _CRTIMP
460 intptr_t
461 __cdecl
462 _wexecv(
463 _In_z_ const wchar_t *_Filename,
464 _In_z_ const wchar_t *const *_ArgList);
465
466 _CRTIMP
467 intptr_t
468 __cdecl
469 _wexecve(
470 _In_z_ const wchar_t *_Filename,
471 _In_z_ const wchar_t *const *_ArgList,
472 _In_opt_z_ const wchar_t *const *_Env);
473
474 _CRTIMP
475 intptr_t
476 __cdecl
477 _wexecvp(
478 _In_z_ const wchar_t *_Filename,
479 _In_z_ const wchar_t *const *_ArgList);
480
481 _CRTIMP
482 intptr_t
483 __cdecl
484 _wexecvpe(
485 _In_z_ const wchar_t *_Filename,
486 _In_z_ const wchar_t *const *_ArgList,
487 _In_opt_z_ const wchar_t *const *_Env);
488
489 _CRTIMP
490 intptr_t
491 __cdecl
492 _wspawnl(
493 _In_ int _Mode,
494 _In_z_ const wchar_t *_Filename,
495 _In_z_ const wchar_t *_ArgList,
496 ...);
497
498 _CRTIMP
499 intptr_t
500 __cdecl
501 _wspawnle(
502 _In_ int _Mode,
503 _In_z_ const wchar_t *_Filename,
504 _In_z_ const wchar_t *_ArgList,
505 ...);
506
507 _CRTIMP
508 intptr_t
509 __cdecl
510 _wspawnlp(
511 _In_ int _Mode,
512 _In_z_ const wchar_t *_Filename,
513 _In_z_ const wchar_t *_ArgList,
514 ...);
515
516 _CRTIMP
517 intptr_t
518 __cdecl
519 _wspawnlpe(
520 _In_ int _Mode,
521 _In_z_ const wchar_t *_Filename,
522 _In_z_ const wchar_t *_ArgList,
523 ...);
524
525 _CRTIMP
526 intptr_t
527 __cdecl
528 _wspawnv(
529 _In_ int _Mode,
530 _In_z_ const wchar_t *_Filename,
531 _In_z_ const wchar_t *const *_ArgList);
532
533 _CRTIMP
534 intptr_t
535 __cdecl
536 _wspawnve(
537 _In_ int _Mode,
538 _In_z_ const wchar_t *_Filename,
539 _In_z_ const wchar_t *const *_ArgList,
540 _In_opt_z_ const wchar_t *const *_Env);
541
542 _CRTIMP
543 intptr_t
544 __cdecl
545 _wspawnvp(
546 _In_ int _Mode,
547 _In_z_ const wchar_t *_Filename,
548 _In_z_ const wchar_t *const *_ArgList);
549
550 _CRTIMP
551 intptr_t
552 __cdecl
553 _wspawnvpe(
554 _In_ int _Mode,
555 _In_z_ const wchar_t *_Filename,
556 _In_z_ const wchar_t *const *_ArgList,
557 _In_opt_z_ const wchar_t *const *_Env);
558
559 #ifndef _CRT_WSYSTEM_DEFINED
560 #define _CRT_WSYSTEM_DEFINED
561 _CRTIMP
562 int
563 __cdecl
564 _wsystem(
565 _In_opt_z_ const wchar_t *_Command);
566 #endif /* !_CRT_WSYSTEM_DEFINED */
567
568 #endif /* !_WPROCESS_DEFINED */
569
570 #ifndef _WCTYPE_INLINE_DEFINED
571 #undef _CRT_WCTYPE_NOINLINE
572 #if !defined(__cplusplus) || defined(_CRT_WCTYPE_NOINLINE)
573 #define iswalpha(_c) (iswctype(_c,_ALPHA))
574 #define iswupper(_c) (iswctype(_c,_UPPER))
575 #define iswlower(_c) (iswctype(_c,_LOWER))
576 #define iswdigit(_c) (iswctype(_c,_DIGIT))
577 #define iswxdigit(_c) (iswctype(_c,_HEX))
578 #define iswspace(_c) (iswctype(_c,_SPACE))
579 #define iswpunct(_c) (iswctype(_c,_PUNCT))
580 #define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
581 #define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
582 #define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
583 #define iswcntrl(_c) (iswctype(_c,_CONTROL))
584 #define iswascii(_c) ((unsigned)(_c) < 0x80)
585
586 #define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
587 #define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
588 #define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
589 #define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
590 #define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
591 #define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
592 #define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
593 #define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
594 #define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
595 #define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
596 #define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
597 #ifndef _CTYPE_DISABLE_MACROS
598 #define isleadbyte(_c) (__PCTYPE_FUNC[(unsigned char)(_c)] & _LEADBYTE)
599 #endif
600 #endif
601 #define _WCTYPE_INLINE_DEFINED
602 #endif
603
604 #if !defined(_POSIX_) || defined(__GNUC__)
605 #ifndef _INO_T_DEFINED
606 #define _INO_T_DEFINED
607 typedef unsigned short _ino_t;
608 #ifndef NO_OLDNAMES
609 typedef unsigned short ino_t;
610 #endif
611 #endif
612
613 #ifndef _DEV_T_DEFINED
614 #define _DEV_T_DEFINED
615 typedef unsigned int _dev_t;
616 #ifndef NO_OLDNAMES
617 typedef unsigned int dev_t;
618 #endif
619 #endif
620
621 #ifndef _OFF_T_DEFINED
622 #define _OFF_T_DEFINED
623 typedef long _off_t;
624 #ifndef NO_OLDNAMES
625 typedef long off_t;
626 #endif
627 #endif
628
629 #ifndef _OFF64_T_DEFINED
630 #define _OFF64_T_DEFINED
631 __MINGW_EXTENSION typedef long long _off64_t;
632 #ifndef NO_OLDNAMES
633 __MINGW_EXTENSION typedef long long off64_t;
634 #endif
635 #endif
636
637 #ifndef _STAT_DEFINED
638 #define _STAT_DEFINED
639
640 struct _stat32 {
641 _dev_t st_dev;
642 _ino_t st_ino;
643 unsigned short st_mode;
644 short st_nlink;
645 short st_uid;
646 short st_gid;
647 _dev_t st_rdev;
648 _off_t st_size;
649 __time32_t st_atime;
650 __time32_t st_mtime;
651 __time32_t st_ctime;
652 };
653
654 struct _stat {
655 _dev_t st_dev;
656 _ino_t st_ino;
657 unsigned short st_mode;
658 short st_nlink;
659 short st_uid;
660 short st_gid;
661 _dev_t st_rdev;
662 _off_t st_size;
663 time_t st_atime;
664 time_t st_mtime;
665 time_t st_ctime;
666 };
667
668 #ifndef NO_OLDNAMES
669 struct stat {
670 _dev_t st_dev;
671 _ino_t st_ino;
672 unsigned short st_mode;
673 short st_nlink;
674 short st_uid;
675 short st_gid;
676 _dev_t st_rdev;
677 _off_t st_size;
678 time_t st_atime;
679 time_t st_mtime;
680 time_t st_ctime;
681 };
682 #endif
683
684 #if _INTEGRAL_MAX_BITS >= 64
685
686 struct _stat32i64 {
687 _dev_t st_dev;
688 _ino_t st_ino;
689 unsigned short st_mode;
690 short st_nlink;
691 short st_uid;
692 short st_gid;
693 _dev_t st_rdev;
694 __MINGW_EXTENSION __int64 st_size;
695 __time32_t st_atime;
696 __time32_t st_mtime;
697 __time32_t st_ctime;
698 };
699
700 struct _stat64i32 {
701 _dev_t st_dev;
702 _ino_t st_ino;
703 unsigned short st_mode;
704 short st_nlink;
705 short st_uid;
706 short st_gid;
707 _dev_t st_rdev;
708 _off_t st_size;
709 __time64_t st_atime;
710 __time64_t st_mtime;
711 __time64_t st_ctime;
712 };
713
714 struct _stat64 {
715 _dev_t st_dev;
716 _ino_t st_ino;
717 unsigned short st_mode;
718 short st_nlink;
719 short st_uid;
720 short st_gid;
721 _dev_t st_rdev;
722 __MINGW_EXTENSION __int64 st_size;
723 __time64_t st_atime;
724 __time64_t st_mtime;
725 __time64_t st_ctime;
726 };
727 #endif
728
729 #define __stat64 _stat64
730
731 #endif
732
733 #ifndef _WSTAT_DEFINED
734 #define _WSTAT_DEFINED
735
736 _CRTIMP
737 int
738 __cdecl
739 _wstat(
740 _In_z_ const wchar_t *_Name,
741 _Out_ struct _stat *_Stat);
742
743 _CRTIMP
744 int
745 __cdecl
746 _wstat32(
747 _In_z_ const wchar_t *_Name,
748 _Out_ struct _stat32 *_Stat);
749
750 #if _INTEGRAL_MAX_BITS >= 64
751
752 _CRTIMP
753 int
754 __cdecl
755 _wstat32i64(
756 _In_z_ const wchar_t *_Name,
757 _Out_ struct _stat32i64 *_Stat);
758
759 _CRTIMP
760 int
761 __cdecl
762 _wstat64i32(
763 _In_z_ const wchar_t *_Name,
764 _Out_ struct _stat64i32 *_Stat);
765
766 _CRTIMP
767 int
768 __cdecl
769 _wstat64(
770 _In_z_ const wchar_t *_Name,
771 _Out_ struct _stat64 *_Stat);
772
773 #endif /* _INTEGRAL_MAX_BITS >= 64 */
774
775 #endif /* _WSTAT_DEFINED */
776
777 #endif /* !defined(_POSIX_) || defined(__GNUC__) */
778
779 #ifndef _WCONIO_DEFINED
780 #define _WCONIO_DEFINED
781
782 _CRTIMP
783 wchar_t*
784 _cgetws(
785 _Inout_z_ wchar_t *_Buffer);
786
787 _Check_return_
788 _CRTIMP
789 wint_t
790 __cdecl
791 _getwch(void);
792
793 _Check_return_
794 _CRTIMP
795 wint_t
796 __cdecl
797 _getwche(void);
798
799 _Check_return_
800 _CRTIMP
801 wint_t
802 __cdecl
803 _putwch(
804 wchar_t _WCh);
805
806 _Check_return_
807 _CRTIMP
808 wint_t
809 __cdecl
810 _ungetwch(
811 wint_t _WCh);
812
813 _Check_return_opt_
814 _CRTIMP
815 int
816 __cdecl
817 _cputws(
818 _In_z_ const wchar_t *_String);
819
820 _Check_return_opt_
821 _CRTIMP
822 int
823 __cdecl
824 _cwprintf(
825 _In_z_ _Printf_format_string_ const wchar_t *_Format,
826 ...);
827
828 _Check_return_opt_
829 _CRTIMP
830 int
831 __cdecl
832 _cwscanf(
833 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
834 ...);
835
836 _Check_return_opt_
837 _CRTIMP
838 int
839 __cdecl
840 _cwscanf_l(
841 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
842 _In_opt_ _locale_t _Locale,
843 ...);
844
845 _Check_return_opt_
846 _CRTIMP
847 int
848 __cdecl
849 _vcwprintf(
850 _In_z_ _Printf_format_string_ const wchar_t *_Format,
851 va_list _ArgList);
852
853 _Check_return_opt_
854 _CRTIMP
855 int
856 __cdecl
857 _cwprintf_p(
858 _In_z_ _Printf_format_string_ const wchar_t *_Format,
859 ...);
860
861 _Check_return_opt_
862 _CRTIMP
863 int
864 __cdecl
865 _vcwprintf_p(
866 _In_z_ _Printf_format_string_ const wchar_t *_Format,
867 va_list _ArgList);
868
869 _CRTIMP
870 int
871 __cdecl
872 _cwprintf_l(
873 _In_z_ _Printf_format_string_ const wchar_t *_Format,
874 _In_opt_ _locale_t _Locale,
875 ...);
876
877 _CRTIMP
878 int
879 __cdecl
880 _vcwprintf_l(
881 _In_z_ _Printf_format_string_ const wchar_t *_Format,
882 _In_opt_ _locale_t _Locale,
883 va_list _ArgList);
884
885 _CRTIMP
886 int
887 __cdecl
888 _cwprintf_p_l(
889 _In_z_ _Printf_format_string_ const wchar_t *_Format,
890 _In_opt_ _locale_t _Locale,
891 ...);
892
893 _CRTIMP
894 int
895 __cdecl
896 _vcwprintf_p_l(
897 _In_z_ _Printf_format_string_ const wchar_t *_Format,
898 _In_opt_ _locale_t _Locale,
899 va_list _ArgList);
900
901 _Check_return_opt_
902 wint_t
903 __cdecl
904 _putwch_nolock(
905 wchar_t _WCh);
906
907 _Check_return_
908 wint_t
909 __cdecl
910 _getwch_nolock(void);
911
912 _Check_return_
913 wint_t
914 __cdecl
915 _getwche_nolock(void);
916
917 _Check_return_opt_
918 wint_t
919 __cdecl
920 _ungetwch_nolock(
921 wint_t _WCh);
922
923 #endif /* _WCONIO_DEFINED */
924
925 #ifndef _WSTDIO_DEFINED
926 #define _WSTDIO_DEFINED
927
928 #ifdef _POSIX_
929 _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
930 #else
931 _Check_return_
932 _CRTIMP
933 FILE*
934 __cdecl
935 _wfsopen(
936 _In_z_ const wchar_t *_Filename,
937 _In_z_ const wchar_t *_Mode,
938 _In_ int _ShFlag);
939 #endif
940
941 _Check_return_opt_
942 _CRTIMP_ALT
943 wint_t
944 __cdecl
945 fgetwc(
946 _Inout_ FILE *_File);
947
948 _Check_return_opt_
949 _CRTIMP
950 wint_t
951 __cdecl
952 _fgetwchar(void);
953
954 _Check_return_opt_
955 _CRTIMP
956 wint_t
957 __cdecl
958 fputwc(
959 _In_ wchar_t _Ch,
960 _Inout_ FILE *_File);
961
962 _Check_return_opt_
963 _CRTIMP
964 wint_t
965 __cdecl
966 _fputwchar(
967 _In_ wchar_t _Ch);
968
969 _Check_return_
970 _CRTIMP
971 wint_t
972 __cdecl
973 getwc(
974 _Inout_ FILE *_File);
975
976 _Check_return_
977 _CRTIMP
978 wint_t
979 __cdecl
980 getwchar(void);
981
982 _Check_return_opt_
983 _CRTIMP
984 wint_t
985 __cdecl
986 putwc(
987 _In_ wchar_t _Ch,
988 _Inout_ FILE *_File);
989
990 _Check_return_opt_
991 _CRTIMP
992 wint_t
993 __cdecl
994 putwchar(
995 _In_ wchar_t _Ch);
996
997 _Check_return_opt_
998 _CRTIMP_ALT
999 wint_t
1000 __cdecl
1001 ungetwc(
1002 _In_ wint_t _Ch,
1003 _Inout_ FILE *_File);
1004
1005 _Check_return_opt_
1006 _CRTIMP
1007 wchar_t*
1008 __cdecl
1009 fgetws(
1010 _Out_writes_z_(_SizeInWords) wchar_t *_Dst,
1011 _In_ int _SizeInWords,
1012 _Inout_ FILE *_File);
1013
1014 _Check_return_opt_
1015 _CRTIMP
1016 int
1017 __cdecl
1018 fputws(
1019 _In_z_ const wchar_t *_Str,
1020 _Inout_ FILE *_File);
1021
1022 _CRTIMP
1023 wchar_t*
1024 __cdecl
1025 _getws(
1026 _Pre_notnull_ _Post_z_ wchar_t *_String);
1027
1028 _Check_return_opt_
1029 _CRTIMP
1030 int
1031 __cdecl
1032 _putws(
1033 _In_z_ const wchar_t *_Str);
1034
1035 _Check_return_opt_
1036 _CRTIMP
1037 int
1038 __cdecl
1039 fwprintf(
1040 _Inout_ FILE *_File,
1041 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1042 ...);
1043
1044 _Check_return_opt_
1045 _CRTIMP
1046 int
1047 __cdecl
1048 wprintf(
1049 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1050 ...);
1051
1052 _Check_return_
1053 _CRTIMP
1054 int
1055 __cdecl
1056 _scwprintf(
1057 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1058 ...);
1059
1060 _Check_return_opt_
1061 _CRTIMP
1062 int
1063 __cdecl
1064 vfwprintf(
1065 _Inout_ FILE *_File,
1066 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1067 va_list _ArgList);
1068
1069 _Check_return_opt_
1070 _CRTIMP
1071 int
1072 __cdecl
1073 vwprintf(
1074 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1075 va_list _ArgList);
1076
1077 #if defined __cplusplus || defined _CRT_NON_CONFORMING_SWPRINTFS
1078 _CRTIMP
1079 int
1080 __cdecl
1081 swprintf(
1082 _Out_ wchar_t*,
1083 const wchar_t*,
1084 ...);
1085
1086 _CRTIMP
1087 int
1088 __cdecl
1089 vswprintf(
1090 _Out_ wchar_t*,
1091 const wchar_t*,
1092 va_list);
1093 #endif
1094
1095 _Check_return_opt_
1096 _CRTIMP
1097 int
1098 __cdecl
1099 _swprintf_c(
1100 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
1101 _In_ size_t _SizeInWords,
1102 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1103 ...);
1104
1105 _Check_return_opt_
1106 _CRTIMP
1107 int
1108 __cdecl
1109 _vswprintf_c(
1110 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
1111 _In_ size_t _SizeInWords,
1112 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1113 va_list _ArgList);
1114
1115 _CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
1116 _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
1117
1118 #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
1119 _CRTIMP int __cdecl snwprintf (wchar_t *s, size_t n, const wchar_t * format, ...);
vsnwprintf(wchar_t * s,size_t n,const wchar_t * format,va_list arg)1120 __CRT_INLINE int __cdecl vsnwprintf (wchar_t *s, size_t n, const wchar_t *format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
1121 _CRTIMP int __cdecl vwscanf (const wchar_t *, va_list);
1122 _CRTIMP int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
1123 _CRTIMP int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
1124 #endif
1125
1126 _Check_return_opt_
1127 _CRTIMP
1128 int
1129 __cdecl
1130 _fwprintf_p(
1131 _Inout_ FILE *_File,
1132 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1133 ...);
1134
1135 _Check_return_opt_
1136 _CRTIMP
1137 int
1138 __cdecl
1139 _wprintf_p(
1140 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1141 ...);
1142
1143 _Check_return_opt_
1144 _CRTIMP
1145 int
1146 __cdecl
1147 _vfwprintf_p(
1148 _Inout_ FILE *_File,
1149 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1150 va_list _ArgList);
1151
1152 _Check_return_opt_
1153 _CRTIMP
1154 int
1155 __cdecl
1156 _vwprintf_p(
1157 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1158 va_list _ArgList);
1159
1160 _Check_return_opt_
1161 _CRTIMP
1162 int
1163 __cdecl
1164 _swprintf_p(
1165 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1166 _In_ size_t _MaxCount,
1167 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1168 ...);
1169
1170 _Check_return_opt_
1171 _CRTIMP
1172 int
1173 __cdecl
1174 _vswprintf_p(
1175 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1176 _In_ size_t _MaxCount,
1177 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1178 va_list _ArgList);
1179
1180 _Check_return_
1181 _CRTIMP
1182 int
1183 __cdecl
1184 _scwprintf_p(
1185 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1186 ...);
1187
1188 _Check_return_
1189 _CRTIMP
1190 int
1191 __cdecl
1192 _vscwprintf_p(
1193 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1194 va_list _ArgList);
1195
1196 _Check_return_opt_
1197 _CRTIMP
1198 int
1199 __cdecl
1200 _wprintf_l(
1201 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1202 _In_opt_ _locale_t _Locale,
1203 ...);
1204
1205 _Check_return_opt_
1206 _CRTIMP
1207 int
1208 __cdecl
1209 _wprintf_p_l(
1210 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1211 _In_opt_ _locale_t _Locale,
1212 ...);
1213
1214 _Check_return_opt_
1215 _CRTIMP
1216 int
1217 __cdecl
1218 _vwprintf_l(
1219 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1220 _In_opt_ _locale_t _Locale,
1221 va_list _ArgList);
1222
1223 _Check_return_opt_
1224 _CRTIMP
1225 int
1226 __cdecl
1227 _vwprintf_p_l(
1228 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1229 _In_opt_ _locale_t _Locale,
1230 va_list _ArgList);
1231
1232 _Check_return_opt_
1233 _CRTIMP
1234 int
1235 __cdecl
1236 _fwprintf_l(
1237 _Inout_ FILE *_File,
1238 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1239 _In_opt_ _locale_t _Locale,
1240 ...);
1241
1242 _Check_return_opt_
1243 _CRTIMP
1244 int
1245 __cdecl
1246 _fwprintf_p_l(
1247 _Inout_ FILE *_File,
1248 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1249 _In_opt_ _locale_t _Locale,
1250 ...);
1251
1252 _Check_return_opt_
1253 _CRTIMP
1254 int
1255 __cdecl
1256 _vfwprintf_l(
1257 _Inout_ FILE *_File,
1258 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1259 _In_opt_ _locale_t _Locale,
1260 va_list _ArgList);
1261
1262 _Check_return_opt_
1263 _CRTIMP
1264 int
1265 __cdecl
1266 _vfwprintf_p_l(
1267 _Inout_ FILE *_File,
1268 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1269 _In_opt_ _locale_t _Locale,
1270 va_list _ArgList);
1271
1272 _Check_return_opt_
1273 _CRTIMP
1274 int
1275 __cdecl
1276 _swprintf_c_l(
1277 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1278 _In_ size_t _MaxCount,
1279 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1280 _In_opt_ _locale_t _Locale,
1281 ...);
1282
1283 _Check_return_opt_
1284 _CRTIMP
1285 int
1286 __cdecl
1287 _swprintf_p_l(
1288 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1289 _In_ size_t _MaxCount,
1290 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1291 _In_opt_ _locale_t _Locale,
1292 ...);
1293
1294 _Check_return_opt_
1295 _CRTIMP
1296 int
1297 __cdecl
1298 _vswprintf_c_l(
1299 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1300 _In_ size_t _MaxCount,
1301 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1302 _In_opt_ _locale_t _Locale,
1303 va_list _ArgList);
1304
1305 _Check_return_opt_
1306 _CRTIMP
1307 int
1308 __cdecl
1309 _vswprintf_p_l(
1310 _Out_writes_z_(_MaxCount) wchar_t *_DstBuf,
1311 _In_ size_t _MaxCount,
1312 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1313 _In_opt_ _locale_t _Locale,
1314 va_list _ArgList);
1315
1316 _Check_return_
1317 _CRTIMP
1318 int
1319 __cdecl
1320 _scwprintf_l(
1321 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1322 _In_opt_ _locale_t _Locale,
1323 ...);
1324
1325 _Check_return_
1326 _CRTIMP
1327 int
1328 __cdecl
1329 _scwprintf_p_l(
1330 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1331 _In_opt_ _locale_t _Locale,
1332 ...);
1333
1334 _Check_return_
1335 _CRTIMP
1336 int
1337 __cdecl
1338 _vscwprintf_p_l(
1339 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1340 _In_opt_ _locale_t _Locale,
1341 va_list _ArgList);
1342
1343 _Check_return_opt_
1344 _CRTIMP
1345 int
1346 __cdecl
1347 _snwprintf_l(
1348 _Out_writes_(_MaxCount) wchar_t *_DstBuf,
1349 _In_ size_t _MaxCount,
1350 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1351 _In_opt_ _locale_t _Locale,
1352 ...);
1353
1354 _Check_return_opt_
1355 _CRTIMP
1356 int
1357 __cdecl
1358 _vsnwprintf_l(
1359 _Out_writes_(_MaxCount) wchar_t *_DstBuf,
1360 _In_ size_t _MaxCount,
1361 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1362 _In_opt_ _locale_t _Locale,
1363 va_list _ArgList);
1364
1365 _CRTIMP
1366 int
1367 __cdecl
1368 _swprintf(
1369 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1370 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1371 ...);
1372
1373 _CRTIMP
1374 int
1375 __cdecl
1376 _vswprintf(
1377 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1378 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1379 va_list _Args);
1380
1381
1382 _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...);
1383 _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args);
1384
1385 #ifndef _CRT_NON_CONFORMING_SWPRINTFS
1386 _Check_return_opt_
1387 static inline
1388 int
1389 __cdecl
swprintf(_Out_writes_z_ (_SizeInWords)wchar_t * _DstBuf,_In_ size_t _SizeInWords,_In_z_ _Printf_format_string_ const wchar_t * _Format,...)1390 swprintf(
1391 _Out_writes_z_(_SizeInWords) wchar_t* _DstBuf,
1392 _In_ size_t _SizeInWords,
1393 _In_z_ _Printf_format_string_ const wchar_t* _Format,
1394 ...)
1395 {
1396 int ret;
1397 va_list args;
1398
1399 va_start(args, _Format);
1400 ret = _vsnwprintf(_DstBuf, _SizeInWords, _Format, args);
1401 va_end(args);
1402 return ret;
1403 }
1404
1405 _Check_return_opt_
1406 static inline
1407 int
1408 __cdecl
vswprintf(_Out_writes_z_ (_SizeInWords)wchar_t * _DstBuf,_In_ size_t _SizeInWords,_In_z_ _Printf_format_string_ const wchar_t * _Format,va_list _ArgList)1409 vswprintf(
1410 _Out_writes_z_(_SizeInWords) wchar_t* _DstBuf,
1411 _In_ size_t _SizeInWords,
1412 _In_z_ _Printf_format_string_ const wchar_t* _Format,
1413 va_list _ArgList)
1414 {
1415 return _vsnwprintf(_DstBuf, _SizeInWords, _Format, _ArgList);
1416 }
1417 #endif
1418
1419 _Check_return_
1420 _CRTIMP
1421 wchar_t*
1422 __cdecl
1423 _wtempnam(
1424 _In_opt_z_ const wchar_t *_Directory,
1425 _In_opt_z_ const wchar_t *_FilePrefix);
1426
1427 _Check_return_
1428 _CRTIMP
1429 int
1430 __cdecl
1431 _vscwprintf(
1432 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1433 va_list _ArgList);
1434
1435 _Check_return_
1436 _CRTIMP
1437 int
1438 __cdecl
1439 _vscwprintf_l(
1440 _In_z_ _Printf_format_string_ const wchar_t *_Format,
1441 _In_opt_ _locale_t _Locale,
1442 va_list _ArgList);
1443
1444 _Check_return_
1445 int
1446 __cdecl
1447 fwscanf(
1448 _Inout_ FILE *_File,
1449 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1450 ...);
1451
1452 _Check_return_opt_
1453 _CRTIMP
1454 int
1455 __cdecl
1456 _fwscanf_l(
1457 _Inout_ FILE *_File,
1458 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1459 _In_opt_ _locale_t _Locale,
1460 ...);
1461
1462 _Check_return_
1463 int
1464 __cdecl
1465 swscanf(
1466 _In_z_ const wchar_t *_Src,
1467 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1468 ...);
1469
1470 _Check_return_opt_
1471 _CRTIMP
1472 int
1473 __cdecl
1474 _swscanf_l(
1475 _In_z_ const wchar_t *_Src,
1476 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1477 _In_opt_ _locale_t _Locale,
1478 ...);
1479
1480 _Check_return_opt_
1481 _CRTIMP
1482 int
1483 __cdecl
1484 _snwscanf(
1485 _In_reads_(_MaxCount) _Pre_z_ const wchar_t *_Src,
1486 _In_ size_t _MaxCount,
1487 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1488 ...);
1489
1490 _Check_return_opt_
1491 _CRTIMP
1492 int
1493 __cdecl
1494 _snwscanf_l(
1495 _In_reads_(_MaxCount) _Pre_z_ const wchar_t *_Src,
1496 _In_ size_t _MaxCount,
1497 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1498 _In_opt_ _locale_t _Locale,
1499 ...);
1500
1501 _Check_return_
1502 int
1503 __cdecl
1504 wscanf(
1505 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1506 ...);
1507
1508 _Check_return_opt_
1509 _CRTIMP
1510 int
1511 __cdecl
1512 _wscanf_l(
1513 _In_z_ _Scanf_format_string_ const wchar_t *_Format,
1514 _In_opt_ _locale_t _Locale,
1515 ...);
1516
1517 _Check_return_
1518 _CRTIMP
1519 FILE*
1520 __cdecl
1521 _wfdopen(
1522 _In_ int _FileHandle,
1523 _In_z_ const wchar_t *_Mode);
1524
1525 _Check_return_
1526 _CRTIMP
1527 FILE*
1528 __cdecl
1529 _wfopen(
1530 _In_z_ const wchar_t *_Filename,
1531 _In_z_ const wchar_t *_Mode);
1532
1533 _Check_return_
1534 _CRTIMP
1535 FILE*
1536 __cdecl
1537 _wfreopen(
1538 _In_z_ const wchar_t *_Filename,
1539 _In_z_ const wchar_t *_Mode,
1540 _Inout_ FILE *_OldFile);
1541
1542 #ifndef _CRT_WPERROR_DEFINED
1543 #define _CRT_WPERROR_DEFINED
1544 _CRTIMP
1545 void
1546 __cdecl
1547 _wperror(
1548 _In_opt_z_ const wchar_t *_ErrMsg);
1549 #endif
1550
1551 _Check_return_
1552 _CRTIMP
1553 FILE*
1554 __cdecl
1555 _wpopen(
1556 _In_z_ const wchar_t *_Command,
1557 _In_z_ const wchar_t *_Mode);
1558
1559 #if !defined(NO_OLDNAMES) && !defined(wpopen)
1560 #define wpopen _wpopen
1561 #endif
1562
1563 _Check_return_
1564 _CRTIMP
1565 int
1566 __cdecl
1567 _wremove(
1568 _In_z_ const wchar_t *_Filename);
1569
1570 _CRTIMP
1571 wchar_t*
1572 __cdecl
1573 _wtmpnam(
1574 _Pre_maybenull_ _Post_z_ wchar_t *_Buffer);
1575
1576 _Check_return_opt_
1577 _CRTIMP
1578 wint_t
1579 __cdecl
1580 _fgetwc_nolock(
1581 _Inout_ FILE *_File);
1582
1583 _Check_return_opt_
1584 _CRTIMP
1585 wint_t
1586 __cdecl
1587 _fputwc_nolock(
1588 _In_ wchar_t _Ch,
1589 _Inout_ FILE *_File);
1590
1591 _Check_return_opt_
1592 _CRTIMP
1593 wint_t
1594 __cdecl
1595 _ungetwc_nolock(
1596 _In_ wint_t _Ch,
1597 _Inout_ FILE *_File);
1598
1599 #undef _CRT_GETPUTWCHAR_NOINLINE
1600
1601 #if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
1602 #define getwchar() fgetwc(stdin)
1603 #define putwchar(_c) fputwc((_c),stdout)
1604 #else
getwchar()1605 _Check_return_ __CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); }
putwchar(_In_ wchar_t _C)1606 _Check_return_opt_ __CRT_INLINE wint_t __cdecl putwchar(_In_ wchar_t _C) {return (fputwc(_C,stdout)); }
1607 #endif
1608
1609 #define getwc(_stm) fgetwc(_stm)
1610 #define putwc(_c,_stm) fputwc(_c,_stm)
1611 #define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
1612 #define _getwc_nolock(_c) _fgetwc_nolock(_c)
1613
1614 #endif /* _WSTDIO_DEFINED */
1615
1616 #ifndef _WSTDLIB_DEFINED
1617 #define _WSTDLIB_DEFINED
1618
1619 _CRTIMP
1620 wchar_t*
1621 __cdecl
1622 _itow(
1623 _In_ int _Value,
1624 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1625 _In_ int _Radix);
1626
1627 _CRTIMP
1628 wchar_t*
1629 __cdecl
1630 _ltow(
1631 _In_ long _Value,
1632 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1633 _In_ int _Radix);
1634
1635 _CRTIMP
1636 wchar_t*
1637 __cdecl
1638 _ultow(
1639 _In_ unsigned long _Value,
1640 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
1641 _In_ int _Radix);
1642
1643 _Check_return_
1644 double
1645 __cdecl
1646 wcstod(
1647 _In_z_ const wchar_t *_Str,
1648 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr);
1649
1650 _Check_return_
1651 _CRTIMP
1652 double
1653 __cdecl
1654 _wcstod_l(
1655 _In_z_ const wchar_t *_Str,
1656 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1657 _In_opt_ _locale_t _Locale);
1658
1659 float __cdecl wcstof( const wchar_t *nptr, wchar_t **endptr);
1660
1661 #if !defined __NO_ISOCEXT /* in libmingwex.a */
1662 float __cdecl wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
1663 long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
1664 #endif /* __NO_ISOCEXT */
1665
1666 _Check_return_
1667 long
1668 __cdecl
1669 wcstol(
1670 _In_z_ const wchar_t *_Str,
1671 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1672 _In_ int _Radix);
1673
1674 _Check_return_
1675 _CRTIMP
1676 long
1677 __cdecl
1678 _wcstol_l(
1679 _In_z_ const wchar_t *_Str,
1680 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1681 _In_ int _Radix,
1682 _In_opt_ _locale_t _Locale);
1683
1684 _Check_return_
1685 unsigned long
1686 __cdecl
1687 wcstoul(
1688 _In_z_ const wchar_t *_Str,
1689 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1690 _In_ int _Radix);
1691
1692 _Check_return_
1693 _CRTIMP
1694 unsigned long
1695 __cdecl
1696 _wcstoul_l(
1697 _In_z_ const wchar_t *_Str,
1698 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1699 _In_ int _Radix,
1700 _In_opt_ _locale_t _Locale);
1701
1702 _Check_return_
1703 _CRTIMP
1704 wchar_t*
1705 __cdecl
1706 _wgetenv(
1707 _In_z_ const wchar_t *_VarName);
1708
1709 #ifndef _CRT_WSYSTEM_DEFINED
1710 #define _CRT_WSYSTEM_DEFINED
1711 _CRTIMP
1712 int
1713 __cdecl
1714 _wsystem(
1715 _In_opt_z_ const wchar_t *_Command);
1716 #endif
1717
1718 _Check_return_
1719 _CRTIMP
1720 double
1721 __cdecl
1722 _wtof(
1723 _In_z_ const wchar_t *_Str);
1724
1725 _Check_return_
1726 _CRTIMP
1727 double
1728 __cdecl
1729 _wtof_l(
1730 _In_z_ const wchar_t *_Str,
1731 _In_opt_ _locale_t _Locale);
1732
1733 _Check_return_
1734 _CRTIMP
1735 int
1736 __cdecl
1737 _wtoi(
1738 _In_z_ const wchar_t *_Str);
1739
1740 _Check_return_
1741 _CRTIMP
1742 int
1743 __cdecl
1744 _wtoi_l(
1745 _In_z_ const wchar_t *_Str,
1746 _In_opt_ _locale_t _Locale);
1747
1748 _Check_return_
1749 _CRTIMP
1750 long
1751 __cdecl
1752 _wtol(
1753 _In_z_ const wchar_t *_Str);
1754
1755 _Check_return_
1756 _CRTIMP
1757 long
1758 __cdecl
1759 _wtol_l(
1760 _In_z_ const wchar_t *_Str,
1761 _In_opt_ _locale_t _Locale);
1762
1763 #if _INTEGRAL_MAX_BITS >= 64
1764
1765 __MINGW_EXTENSION
1766 _CRTIMP
1767 wchar_t*
1768 __cdecl
1769 _i64tow(
1770 _In_ __int64 _Val,
1771 _Pre_notnull_ _Post_z_ wchar_t *_DstBuf,
1772 _In_ int _Radix);
1773
1774 __MINGW_EXTENSION
1775 _CRTIMP
1776 wchar_t*
1777 __cdecl
1778 _ui64tow(
1779 _In_ unsigned __int64 _Val,
1780 _Pre_notnull_ _Post_z_ wchar_t *_DstBuf,
1781 _In_ int _Radix);
1782
1783 __MINGW_EXTENSION
1784 _Check_return_
1785 _CRTIMP
1786 __int64
1787 __cdecl
1788 _wtoi64(
1789 _In_z_ const wchar_t *_Str);
1790
1791 __MINGW_EXTENSION
1792 _Check_return_
1793 _CRTIMP
1794 __int64
1795 __cdecl
1796 _wtoi64_l(
1797 _In_z_ const wchar_t *_Str,
1798 _In_opt_ _locale_t _Locale);
1799
1800 __MINGW_EXTENSION
1801 _Check_return_
1802 _CRTIMP
1803 __int64
1804 __cdecl
1805 _wcstoi64(
1806 _In_z_ const wchar_t *_Str,
1807 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1808 _In_ int _Radix);
1809
1810 __MINGW_EXTENSION
1811 _Check_return_
1812 _CRTIMP
1813 __int64
1814 __cdecl
1815 _wcstoi64_l(
1816 _In_z_ const wchar_t *_Str,
1817 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1818 _In_ int _Radix,
1819 _In_opt_ _locale_t _Locale);
1820
1821 __MINGW_EXTENSION
1822 _Check_return_
1823 _CRTIMP
1824 unsigned __int64
1825 __cdecl
1826 _wcstoui64(
1827 _In_z_ const wchar_t *_Str,
1828 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1829 _In_ int _Radix);
1830
1831 __MINGW_EXTENSION
1832 _Check_return_
1833 _CRTIMP
1834 unsigned __int64
1835 __cdecl
1836 _wcstoui64_l(
1837 _In_z_ const wchar_t *_Str,
1838 _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr,
1839 _In_ int _Radix,
1840 _In_opt_ _locale_t _Locale);
1841
1842 #endif /* _INTEGRAL_MAX_BITS >= 64 */
1843
1844 #endif /* _WSTDLIB_DEFINED */
1845
1846 #ifndef _POSIX_
1847
1848 #ifndef _WSTDLIBP_DEFINED
1849 #define _WSTDLIBP_DEFINED
1850
1851 _Check_return_
1852 _CRTIMP
1853 wchar_t*
1854 __cdecl
1855 _wfullpath(
1856 _Out_writes_opt_z_(_SizeInWords) wchar_t *_FullPath,
1857 _In_z_ const wchar_t *_Path,
1858 _In_ size_t _SizeInWords);
1859
1860 _CRTIMP
1861 void
1862 __cdecl
1863 _wmakepath(
1864 _Pre_notnull_ _Post_z_ wchar_t *_ResultPath,
1865 _In_opt_z_ const wchar_t *_Drive,
1866 _In_opt_z_ const wchar_t *_Dir,
1867 _In_opt_z_ const wchar_t *_Filename,
1868 _In_opt_z_ const wchar_t *_Ext);
1869
1870 #ifndef _CRT_WPERROR_DEFINED
1871 #define _CRT_WPERROR_DEFINED
1872 _CRTIMP
1873 void
1874 __cdecl
1875 _wperror(
1876 _In_opt_z_ const wchar_t *_ErrMsg);
1877 #endif
1878
1879 _Check_return_
1880 _CRTIMP
1881 int
1882 __cdecl
1883 _wputenv(
1884 _In_z_ const wchar_t *_EnvString);
1885
1886 _CRTIMP
1887 void
1888 __cdecl
1889 _wsearchenv(
1890 _In_z_ const wchar_t *_Filename,
1891 _In_z_ const wchar_t *_EnvVar,
1892 _Pre_notnull_ _Post_z_ wchar_t *_ResultPath);
1893
1894 _CRTIMP
1895 void
1896 __cdecl
1897 _wsplitpath(
1898 _In_z_ const wchar_t *_FullPath,
1899 _Pre_maybenull_ _Post_z_ wchar_t *_Drive,
1900 _Pre_maybenull_ _Post_z_ wchar_t *_Dir,
1901 _Pre_maybenull_ _Post_z_ wchar_t *_Filename,
1902 _Pre_maybenull_ _Post_z_ wchar_t *_Ext);
1903
1904 #endif /* _WSTDLIBP_DEFINED */
1905
1906 #endif /* _POSIX_ */
1907
1908 #ifndef _WSTRING_DEFINED
1909 #define _WSTRING_DEFINED
1910
1911 _Check_return_
1912 _CRTIMP
1913 wchar_t*
1914 __cdecl
1915 _wcsdup(
1916 _In_z_ const wchar_t *_Str);
1917
1918 wchar_t*
1919 __cdecl
1920 wcscat(
1921 _Inout_updates_z_(_String_length_(_Dest) + _String_length_(_Source) + 1) wchar_t *_Dest,
1922 _In_z_ const wchar_t *_Source);
1923
1924 _CONST_RETURN
1925 wchar_t*
1926 __cdecl
1927 wcschr(
1928 _In_z_ const wchar_t *_Str,
1929 wchar_t _Ch);
1930
1931 #ifdef __cplusplus
1932 extern "C++"
1933 _Check_return_
1934 _When_(return != NULL, _Ret_range_(_String, _String + _String_length_(_String) - 1))
wcschr(_In_z_ wchar_t * _String,wchar_t _C)1935 inline wchar_t* __cdecl wcschr(_In_z_ wchar_t *_String, wchar_t _C)
1936 {
1937 return const_cast<wchar_t*>(wcschr(static_cast<const wchar_t*>(_String), _C));
1938 }
1939 #endif // __cplusplus
1940
1941 _Check_return_
1942 int
1943 __cdecl
1944 wcscmp(
1945 _In_z_ const wchar_t *_Str1,
1946 _In_z_ const wchar_t *_Str2);
1947
1948 wchar_t*
1949 __cdecl
1950 wcscpy(
1951 _Out_writes_z_(_String_length_(_Source) + 1) wchar_t *_Dest,
1952 _In_z_ const wchar_t *_Source);
1953
1954 _Check_return_
1955 size_t
1956 __cdecl
1957 wcscspn(
1958 _In_z_ const wchar_t *_Str,
1959 _In_z_ const wchar_t *_Control);
1960
1961 _CRTIMP
1962 size_t
1963 __cdecl
1964 wcslen(
1965 _In_z_ const wchar_t *_Str);
1966
1967 _When_(_MaxCount > _String_length_(_Src),
1968 _Post_satisfies_(return == _String_length_(_Src)))
1969 _When_(_MaxCount <= _String_length_(_Src),
1970 _Post_satisfies_(return == _MaxCount))
1971 size_t
1972 __cdecl
1973 wcsnlen(
1974 _In_reads_or_z_(_MaxCount) const wchar_t *_Src,
1975 _In_ size_t _MaxCount);
1976
1977 wchar_t*
1978 __cdecl
1979 wcsncat(
1980 wchar_t *_Dest,
1981 const wchar_t *_Source,
1982 size_t _Count);
1983
1984 _Check_return_
1985 int
1986 __cdecl
1987 wcsncmp(
1988 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1,
1989 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2,
1990 _In_ size_t _MaxCount);
1991
1992 wchar_t*
1993 __cdecl
1994 wcsncpy(
1995 wchar_t *_Dest,
1996 const wchar_t *_Source,
1997 size_t _Count);
1998
1999 _Check_return_
2000 _CONST_RETURN
2001 wchar_t*
2002 __cdecl
2003 wcspbrk(
2004 _In_z_ const wchar_t *_Str,
2005 _In_z_ const wchar_t *_Control);
2006
2007 #ifdef __cplusplus
2008 extern "C++"
2009 _Check_return_
wcspbrk(_In_z_ wchar_t * _Str,_In_z_ const wchar_t * _Control)2010 inline wchar_t* __cdecl wcspbrk(_In_z_ wchar_t *_Str, _In_z_ const wchar_t *_Control)
2011 {
2012 return const_cast<wchar_t*>(wcspbrk(static_cast<const wchar_t*>(_Str), _Control));
2013 }
2014 #endif // __cplusplus
2015
2016 _Check_return_
2017 _CONST_RETURN
2018 wchar_t*
2019 __cdecl
2020 wcsrchr(
2021 _In_z_ const wchar_t *_Str,
2022 _In_ wchar_t _Ch);
2023
2024 #ifdef __cplusplus
2025 extern "C++"
2026 _Check_return_
wcsrchr(_In_z_ wchar_t * _Str,_In_ wchar_t _Ch)2027 inline wchar_t* __cdecl wcsrchr(_In_z_ wchar_t *_Str, _In_ wchar_t _Ch)
2028 {
2029 return const_cast<wchar_t*>(wcsrchr(static_cast<const wchar_t*>(_Str), _Ch));
2030 }
2031 #endif // __cplusplus
2032
2033 _Check_return_
2034 size_t
2035 __cdecl
2036 wcsspn(
2037 _In_z_ const wchar_t *_Str,
2038 _In_z_ const wchar_t *_Control);
2039
2040 _CONST_RETURN
2041 wchar_t*
2042 __cdecl
2043 wcsstr(
2044 _In_z_ const wchar_t *_Str,
2045 _In_z_ const wchar_t *_SubStr);
2046
2047 #ifdef __cplusplus
2048 extern "C++"
2049 _Check_return_ _Ret_maybenull_
2050 _When_(return != NULL, _Ret_range_(_String, _String + _String_length_(_String) - 1))
wcsstr(_In_z_ wchar_t * _String,_In_z_ const wchar_t * _SubStr)2051 inline wchar_t* __cdecl wcsstr(_In_z_ wchar_t *_String, _In_z_ const wchar_t *_SubStr)
2052 {
2053 return const_cast<wchar_t*>(wcsstr(static_cast<const wchar_t*>(_String), _SubStr));
2054 }
2055 #endif // __cplusplus
2056
2057 _Check_return_
2058 wchar_t*
2059 __cdecl
2060 wcstok(
2061 _Inout_opt_z_ wchar_t *_Str,
2062 _In_z_ const wchar_t *_Delim);
2063
2064 _Check_return_
2065 _CRTIMP
2066 wchar_t*
2067 __cdecl
2068 _wcserror(
2069 _In_ int _ErrNum);
2070
2071 _Check_return_
2072 _CRTIMP
2073 wchar_t*
2074 __cdecl
2075 __wcserror(
2076 _In_opt_z_ const wchar_t *_Str);
2077
2078 _Check_return_
2079 _CRTIMP
2080 int
2081 __cdecl
2082 _wcsicmp(
2083 _In_z_ const wchar_t *_Str1,
2084 _In_z_ const wchar_t *_Str2);
2085
2086 _Check_return_
2087 _CRTIMP
2088 int
2089 __cdecl
2090 _wcsicmp_l(
2091 _In_z_ const wchar_t *_Str1,
2092 _In_z_ const wchar_t *_Str2,
2093 _In_opt_ _locale_t _Locale);
2094
2095 _Check_return_
2096 _CRTIMP
2097 int
2098 __cdecl
2099 _wcsnicmp(
2100 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1,
2101 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2,
2102 _In_ size_t _MaxCount);
2103
2104 _Check_return_
2105 _CRTIMP
2106 int
2107 __cdecl
2108 _wcsnicmp_l(
2109 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1,
2110 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2,
2111 _In_ size_t _MaxCount,
2112 _In_opt_ _locale_t _Locale);
2113
2114 _CRTIMP
2115 wchar_t*
2116 __cdecl
2117 _wcsnset(
2118 wchar_t *_Str,
2119 wchar_t _Val,
2120 size_t _MaxCount);
2121
2122 _CRTIMP
2123 wchar_t*
2124 __cdecl
2125 _wcsrev(
2126 _Inout_z_ wchar_t *_Str);
2127
2128 _CRTIMP
2129 wchar_t*
2130 __cdecl
2131 _wcsset(
2132 wchar_t *_Str,
2133 wchar_t _Val);
2134
2135 _CRTIMP
2136 wchar_t*
2137 __cdecl
2138 _wcslwr(
2139 _Inout_z_ wchar_t *_String);
2140
2141 _CRTIMP
2142 wchar_t*
2143 _wcslwr_l(
2144 wchar_t *_String,
2145 _locale_t _Locale);
2146
2147 _CRTIMP
2148 wchar_t*
2149 __cdecl
2150 _wcsupr(
2151 _Inout_z_ wchar_t *_String);
2152
2153 _CRTIMP
2154 wchar_t*
2155 _wcsupr_l(
2156 wchar_t *_String,
2157 _locale_t _Locale);
2158
2159 _Check_return_opt_
2160 size_t
2161 __cdecl
2162 wcsxfrm(
2163 _Out_writes_opt_(_MaxCount) _Post_maybez_ wchar_t *_Dst,
2164 _In_z_ const wchar_t *_Src,
2165 _In_ size_t _MaxCount);
2166
2167 _Check_return_opt_
2168 _CRTIMP
2169 size_t
2170 __cdecl
2171 _wcsxfrm_l(
2172 _Out_writes_opt_(_MaxCount) _Post_maybez_ wchar_t *_Dst,
2173 _In_z_ const wchar_t *_Src,
2174 _In_ size_t _MaxCount,
2175 _In_opt_ _locale_t _Locale);
2176
2177 _Check_return_
2178 int
2179 __cdecl
2180 wcscoll(
2181 _In_z_ const wchar_t *_Str1,
2182 _In_z_ const wchar_t *_Str2);
2183
2184 _Check_return_
2185 _CRTIMP
2186 int
2187 __cdecl
2188 _wcscoll_l(
2189 _In_z_ const wchar_t *_Str1,
2190 _In_z_ const wchar_t *_Str2,
2191 _In_opt_ _locale_t _Locale);
2192
2193 _Check_return_
2194 _CRTIMP
2195 int
2196 __cdecl
2197 _wcsicoll(
2198 _In_z_ const wchar_t *_Str1,
2199 _In_z_ const wchar_t *_Str2);
2200
2201 _Check_return_
2202 _CRTIMP
2203 int
2204 __cdecl
2205 _wcsicoll_l(
2206 _In_z_ const wchar_t *_Str1,
2207 _In_z_ const wchar_t *_Str2,
2208 _In_opt_ _locale_t _Locale);
2209
2210 _Check_return_
2211 _CRTIMP
2212 int
2213 __cdecl
2214 _wcsncoll(
2215 _In_z_ const wchar_t *_Str1,
2216 _In_z_ const wchar_t *_Str2,
2217 _In_ size_t _MaxCount);
2218
2219 _Check_return_
2220 _CRTIMP
2221 int
2222 __cdecl
2223 _wcsncoll_l(
2224 _In_z_ const wchar_t *_Str1,
2225 _In_z_ const wchar_t *_Str2,
2226 _In_ size_t _MaxCount,
2227 _In_opt_ _locale_t _Locale);
2228
2229 _Check_return_
2230 _CRTIMP
2231 int
2232 __cdecl
2233 _wcsnicoll(
2234 _In_z_ const wchar_t *_Str1,
2235 _In_z_ const wchar_t *_Str2,
2236 _In_ size_t _MaxCount);
2237
2238 _Check_return_
2239 _CRTIMP
2240 int
2241 __cdecl
2242 _wcsnicoll_l(
2243 _In_z_ const wchar_t *_Str1,
2244 _In_z_ const wchar_t *_Str2,
2245 _In_ size_t _MaxCount,
2246 _In_opt_ _locale_t _Locale);
2247
2248 #ifndef NO_OLDNAMES
2249
2250 _Check_return_
2251 _CRTIMP
2252 wchar_t*
2253 __cdecl
2254 wcsdup(
2255 _In_z_ const wchar_t *_Str);
2256
2257 #define wcswcs wcsstr
2258
2259 _Check_return_
2260 _CRTIMP
2261 int
2262 __cdecl
2263 wcsicmp(
2264 _In_z_ const wchar_t *_Str1,
2265 _In_z_ const wchar_t *_Str2);
2266
2267 _Check_return_
2268 _CRTIMP
2269 int
2270 __cdecl
2271 wcsnicmp(
2272 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1,
2273 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2,
2274 _In_ size_t _MaxCount);
2275
2276 _CRTIMP
2277 wchar_t*
2278 __cdecl
2279 wcsnset(
2280 _Inout_updates_z_(_MaxCount) wchar_t *_Str,
2281 _In_ wchar_t _Val,
2282 _In_ size_t _MaxCount);
2283
2284 _CRTIMP
2285 wchar_t*
2286 __cdecl
2287 wcsrev(
2288 _Inout_z_ wchar_t *_Str);
2289
2290 _CRTIMP
2291 wchar_t*
2292 __cdecl
2293 wcsset(
2294 _Inout_z_ wchar_t *_Str,
2295 wchar_t _Val);
2296
2297 _CRTIMP
2298 wchar_t*
2299 __cdecl
2300 wcslwr(
2301 _Inout_z_ wchar_t *_Str);
2302
2303 _CRTIMP
2304 wchar_t*
2305 __cdecl
2306 wcsupr(
2307 _Inout_z_ wchar_t *_Str);
2308
2309 _Check_return_
2310 _CRTIMP
2311 int
2312 __cdecl
2313 wcsicoll(
2314 _In_z_ const wchar_t *_Str1,
2315 _In_z_ const wchar_t *_Str2);
2316
2317 #endif /* NO_OLDNAMES */
2318
2319 #endif /* _WSTRING_DEFINED */
2320
2321 #ifndef _TM_DEFINED
2322 #define _TM_DEFINED
2323 struct tm {
2324 int tm_sec;
2325 int tm_min;
2326 int tm_hour;
2327 int tm_mday;
2328 int tm_mon;
2329 int tm_year;
2330 int tm_wday;
2331 int tm_yday;
2332 int tm_isdst;
2333 };
2334 #endif
2335
2336 #ifndef _WTIME_DEFINED
2337 #define _WTIME_DEFINED
2338
2339 _CRTIMP
2340 wchar_t*
2341 __cdecl
2342 _wasctime(
2343 _In_ const struct tm *_Tm);
2344
2345 _CRTIMP
2346 wchar_t*
2347 __cdecl
2348 _wctime32(
2349 _In_ const __time32_t *_Time);
2350
2351 _Success_(return > 0)
2352 size_t
2353 __cdecl
2354 wcsftime(
2355 _Out_writes_z_(_SizeInWords) wchar_t *_Buf,
2356 _In_ size_t _SizeInWords,
2357 _In_z_ _Printf_format_string_ const wchar_t *_Format,
2358 _In_ const struct tm *_Tm);
2359
2360 _Success_(return > 0)
2361 _CRTIMP
2362 size_t
2363 __cdecl
2364 _wcsftime_l(
2365 _Out_writes_z_(_SizeInWords) wchar_t *_Buf,
2366 _In_ size_t _SizeInWords,
2367 _In_z_ _Printf_format_string_ const wchar_t *_Format,
2368 _In_ const struct tm *_Tm,
2369 _In_opt_ _locale_t _Locale);
2370
2371 _CRTIMP
2372 wchar_t*
2373 __cdecl
2374 _wstrdate(
2375 _Out_writes_z_(9) wchar_t *_Buffer);
2376
2377 _CRTIMP
2378 wchar_t*
2379 __cdecl
2380 _wstrtime(
2381 _Out_writes_z_(9) wchar_t *_Buffer);
2382
2383 _CRTIMP
2384 errno_t
2385 __cdecl
2386 _wasctime_s(
2387 _Out_writes_(_SizeInWords) _Post_readable_size_(26) wchar_t *_Buf,
2388 _In_ size_t _SizeInWords,
2389 _In_ const struct tm *_Tm);
2390
2391 _CRTIMP
2392 errno_t
2393 __cdecl
2394 _wctime32_s(
2395 _Out_writes_(_SizeInWords) _Post_readable_size_(26) wchar_t *_Buf,
2396 _In_ size_t _SizeInWords,
2397 _In_ const __time32_t *_Time);
2398
2399 _CRTIMP
2400 errno_t
2401 __cdecl
2402 _wstrdate_s(
2403 _Out_writes_(_SizeInWords) _Post_readable_size_(9) wchar_t *_Buf,
2404 _In_range_(>=, 9) size_t _SizeInWords);
2405
2406 _CRTIMP
2407 errno_t
2408 __cdecl
2409 _wstrtime_s(
2410 _Out_writes_(_SizeInWords) _Post_readable_size_(9) wchar_t *_Buf,
2411 _In_ size_t _SizeInWords);
2412
2413 #if _INTEGRAL_MAX_BITS >= 64
2414
2415 _CRTIMP
2416 wchar_t*
2417 __cdecl
2418 _wctime64(
2419 _In_ const __time64_t *_Time);
2420
2421 _CRTIMP
2422 errno_t
2423 __cdecl
2424 _wctime64_s(
2425 _Out_writes_(_SizeInWords) _Post_readable_size_(26) wchar_t *_Buf,
2426 _In_ size_t _SizeInWords,
2427 _In_ const __time64_t *_Time);
2428
2429 #endif /* _INTEGRAL_MAX_BITS >= 64 */
2430
2431 #if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
2432 #define _INC_WTIME_INL
2433 #ifdef _USE_32BIT_TIME_T
_wctime(const time_t * _Time)2434 __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
2435 #else /* !_USE_32BIT_TIME_T */
_wctime(const time_t * _Time)2436 __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
2437 #endif /* !_USE_32BIT_TIME_T */
2438 #endif /* !defined (RC_INVOKED) && !defined (_INC_WTIME_INL) */
2439
2440 #endif /* _WTIME_DEFINED */
2441
2442 typedef int mbstate_t;
2443 typedef wchar_t _Wint_t;
2444
2445 wint_t
2446 __cdecl
2447 btowc(
2448 int);
2449
2450 size_t
2451 __cdecl
2452 mbrlen(
2453 _In_reads_bytes_opt_(_SizeInBytes) _Pre_opt_z_ const char *_Ch,
2454 _In_ size_t _SizeInBytes,
2455 _Out_opt_ mbstate_t *_State);
2456
2457 size_t
2458 __cdecl
2459 mbrtowc(
2460 _Pre_maybenull_ _Post_z_ wchar_t *_DstCh,
2461 _In_reads_bytes_opt_(_SizeInBytes) _Pre_opt_z_ const char *_SrcCh,
2462 _In_ size_t _SizeInBytes,
2463 _Out_opt_ mbstate_t *_State);
2464
2465 size_t
2466 __cdecl
2467 mbsrtowcs(
2468 _Pre_notnull_ _Post_z_ wchar_t *_Dest,
2469 _Inout_ _Deref_prepost_opt_valid_ const char **_PSrc,
2470 _In_ size_t _Count,
2471 _Inout_opt_ mbstate_t *_State);
2472
2473 size_t
2474 __cdecl
2475 wcrtomb(
2476 _Pre_maybenull_ _Post_z_ char *_Dest,
2477 _In_ wchar_t _Source,
2478 _Out_opt_ mbstate_t *_State);
2479
2480 size_t
2481 __cdecl
2482 wcsrtombs(
2483 _Pre_maybenull_ _Post_z_ char *_Dest,
2484 _Inout_ _Deref_prepost_z_ const wchar_t **_PSource,
2485 _In_ size_t _Count,
2486 _Out_opt_ mbstate_t *_State);
2487
2488 int
2489 __cdecl
2490 wctob(
2491 _In_ wint_t _WCh);
2492
2493 #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
2494
2495 wchar_t*
2496 __cdecl
2497 wmemset(
2498 _Out_writes_all_(_N) wchar_t *_S,
2499 _In_ wchar_t _C,
2500 _In_ size_t _N);
2501
2502 _CONST_RETURN
2503 wchar_t*
2504 __cdecl
2505 wmemchr(
2506 _In_reads_(_N) const wchar_t *_S,
2507 _In_ wchar_t _C,
2508 _In_ size_t _N);
2509
2510 #ifdef __cplusplus
2511 extern "C++"
wmemchr(_In_reads_ (_N)wchar_t * _S,_In_ wchar_t _C,_In_ size_t _N)2512 inline wchar_t* __cdecl wmemchr(
2513 _In_reads_(_N) wchar_t *_S,
2514 _In_ wchar_t _C,
2515 _In_ size_t _N)
2516 {
2517 const wchar_t *_SC = _S;
2518 return const_cast<wchar_t*>(wmemchr(_SC, _C, _N));
2519 }
2520 #endif // __cplusplus
2521
2522 int
2523 __cdecl
2524 wmemcmp(
2525 _In_reads_(_N) const wchar_t *_S1,
2526 _In_reads_(_N) const wchar_t *_S2,
2527 _In_ size_t _N);
2528
2529 _Post_equal_to_(_S1)
2530 _At_buffer_(_S1, _Iter_, _N, _Post_satisfies_(_S1[_Iter_] == _S2[_Iter_]))
2531 wchar_t*
2532 __cdecl
2533 wmemcpy(
2534 _Out_writes_all_(_N) wchar_t *_S1,
2535 _In_reads_(_N) const wchar_t *_S2,
2536 _In_ size_t _N);
2537
2538 wchar_t*
2539 __cdecl
2540 wmemmove(
2541 _Out_writes_all_opt_(_N) wchar_t *_S1,
2542 _In_reads_opt_(_N) const wchar_t *_S2,
2543 _In_ size_t _N);
2544
2545 __MINGW_EXTENSION
2546 long long
2547 __cdecl
2548 wcstoll(
2549 const wchar_t *nptr,
2550 wchar_t **endptr,
2551 int base);
2552
2553 __MINGW_EXTENSION
2554 unsigned long long
2555 __cdecl
2556 wcstoull(
2557 const wchar_t *nptr,
2558 wchar_t **endptr,
2559 int base);
2560
2561 #endif /* __NO_ISOCEXT */
2562
2563 void*
2564 __cdecl
2565 memmove(
2566 _Out_writes_bytes_all_opt_(_MaxCount) void *_Dst,
2567 _In_reads_bytes_opt_(_MaxCount) const void *_Src,
2568 _In_ size_t _MaxCount);
2569
2570 _Post_equal_to_(_Dst)
2571 _At_buffer_((unsigned char*)_Dst,
2572 _Iter_,
2573 _MaxCount,
2574 _Post_satisfies_(((unsigned char*)_Dst)[_Iter_] == ((unsigned char*)_Src)[_Iter_]))
2575 void*
2576 __cdecl
2577 memcpy(
2578 _Out_writes_bytes_all_(_MaxCount) void *_Dst,
2579 _In_reads_bytes_(_MaxCount) const void *_Src,
2580 _In_ size_t _MaxCount);
2581
2582 __CRT_INLINE
2583 int
2584 __cdecl
fwide(_In_opt_ FILE * _F,int _M)2585 fwide(
2586 _In_opt_ FILE *_F,
2587 int _M)
2588 {
2589 (void)_F;
2590 return (_M);
2591 }
2592
2593 __CRT_INLINE
2594 int
2595 __cdecl
mbsinit(_In_opt_ const mbstate_t * _P)2596 mbsinit(
2597 _In_opt_ const mbstate_t *_P)
2598 {
2599 return (!_P || *_P==0);
2600 }
2601
2602 __CRT_INLINE
2603 _CONST_RETURN
2604 wchar_t*
2605 __cdecl
wmemchr(_In_reads_ (_N)const wchar_t * _S,_In_ wchar_t _C,_In_ size_t _N)2606 wmemchr(
2607 _In_reads_(_N) const wchar_t *_S,
2608 _In_ wchar_t _C,
2609 _In_ size_t _N)
2610 {
2611 for (;0<_N;++_S,--_N)
2612 {
2613 if (*_S==_C) return (_CONST_RETURN wchar_t *)(_S);
2614 }
2615 return (0);
2616 }
2617
2618 __CRT_INLINE
2619 int
2620 __cdecl
wmemcmp(_In_reads_ (_N)const wchar_t * _S1,_In_reads_ (_N)const wchar_t * _S2,_In_ size_t _N)2621 wmemcmp(
2622 _In_reads_(_N) const wchar_t *_S1,
2623 _In_reads_(_N) const wchar_t *_S2,
2624 _In_ size_t _N)
2625 {
2626 for (; 0 < _N; ++_S1,++_S2,--_N)
2627 {
2628 if (*_S1!=*_S2) return (*_S1 < *_S2 ? -1 : +1);
2629 }
2630 return (0);
2631 }
2632
2633 _Post_equal_to_(_S1)
2634 _At_buffer_(_S1,
2635 _Iter_,
2636 _N,
2637 _Post_satisfies_(_S1[_Iter_] == _S2[_Iter_]))
2638 __CRT_INLINE
2639 wchar_t*
2640 __cdecl
wmemcpy(_Out_writes_all_ (_N)wchar_t * _S1,_In_reads_ (_N)const wchar_t * _S2,_In_ size_t _N)2641 wmemcpy(
2642 _Out_writes_all_(_N) wchar_t *_S1,
2643 _In_reads_(_N) const wchar_t *_S2,
2644 _In_ size_t _N)
2645 {
2646 return (wchar_t *)memcpy(_S1,_S2,_N*sizeof(wchar_t));
2647 }
2648
2649 __CRT_INLINE
2650 wchar_t*
2651 __cdecl
wmemmove(_Out_writes_all_opt_ (_N)wchar_t * _S1,_In_reads_opt_ (_N)const wchar_t * _S2,_In_ size_t _N)2652 wmemmove(
2653 _Out_writes_all_opt_(_N) wchar_t *_S1,
2654 _In_reads_opt_(_N) const wchar_t *_S2,
2655 _In_ size_t _N)
2656 {
2657 return (wchar_t *)memmove(_S1,_S2,_N*sizeof(wchar_t));
2658 }
2659
2660 __CRT_INLINE
2661 wchar_t*
2662 __cdecl
wmemset(_Out_writes_all_ (_N)wchar_t * _S,_In_ wchar_t _C,_In_ size_t _N)2663 wmemset(
2664 _Out_writes_all_(_N) wchar_t *_S,
2665 _In_ wchar_t _C,
2666 _In_ size_t _N)
2667 {
2668 wchar_t *_Su = _S;
2669 for (;0<_N;++_Su,--_N) {
2670 *_Su = _C;
2671 }
2672 return (_S);
2673 }
2674
2675 #ifdef _MSC_VER
2676 #pragma warning(pop)
2677 #endif
2678
2679 #ifdef __cplusplus
2680 }
2681 #endif
2682
2683 #pragma pack(pop)
2684
2685 #include <sec_api/wchar_s.h>
2686 #endif
2687