4 * Declarations relating to support for wide characters; many are simply
5 * inherited by (sub-optimal) inclusion of other header files.
9 * Written by Rob Savoye <rob@cygnus.com>
10 * Copyright (C) 1997, 1999-2009, 2011, 2015, MinGW.org Project.
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
20 * The above copyright notice, this permission notice, and the following
21 * disclaimer shall be included in all copies or substantial portions of
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
30 * DEALINGS IN THE SOFTWARE.
35 #pragma GCC system_header
37 /* All the headers include this file. */
40 /* MSDN says that isw* char classifications are in wchar.h and wctype.h.
41 * Although the wctype names are ANSI, their exposure in this header is
42 * not; nevertheless, we replicate them here, for MSDN conformity.
46 #ifndef __STRICT_ANSI__
47 /* This is also necessary, to support the non-ANSI wchar.h declarations
48 * which MSDN identifies as being provided here.
50 # include <sys/types.h>
51 #endif /* __STRICT_ANSI__ */
54 #define WCHAR_MAX 0xffff
56 # define WEOF (wchar_t)(0xffff)
62 #define __need_wchar_t
67 # if defined __GNUC__ && __GNUC__ >= 3
68 # define __need___va_list
70 # define __VALIST __builtin_va_list
72 # define __VALIST char*
78 #ifndef _FILE_DEFINED /* Also in stdio.h */
91 #endif /* Not _FILE_DEFINED */
94 #define _FAKE_TIME_H_SOURCED 1
95 #include <parts/time.h>
97 #ifndef _TM_DEFINED /* Also in time.h */
99 int tm_sec; /* seconds after the minute - [0,59] */
100 int tm_min; /* minutes after the hour - [0,59] */
101 int tm_hour; /* hours since midnight - [0,23] */
102 int tm_mday; /* day of the month - [1,31] */
103 int tm_mon; /* months since January - [0,11] */
104 int tm_year; /* years since 1900 */
105 int tm_wday; /* days since Sunday - [0,6] */
106 int tm_yday; /* days since January 1 - [0,365] */
107 int tm_isdst; /* daylight savings time flag */
112 #ifndef _WSTDIO_DEFINED
113 /* Also in stdio.h - keep in sync */
114 _CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...);
115 _CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...);
116 _CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
117 _CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST);
118 _CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST);
119 _CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
120 _CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...);
121 _CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...);
122 _CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...);
123 _CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*);
124 _CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*);
125 _CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*);
127 /* These differ from the ISO C prototypes, which have a maxlen parameter like snprintf. */
128 #ifndef __STRICT_ANSI__
129 _CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...);
130 _CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST);
134 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
135 _CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*);
136 _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
137 _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void);
138 _CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
139 _CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
140 #ifndef __STRICT_ANSI__
141 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
142 _CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*);
143 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, const wchar_t *);
144 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*);
145 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*);
146 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int);
147 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*);
148 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*);
149 _CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*);
150 _CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
151 _CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*);
152 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*);
153 #endif /* __STRICT_ANSI__ */
154 #endif /* __MSVCRT__ */
156 #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
157 int __cdecl __MINGW_NOTHROW snwprintf (wchar_t*, size_t, const wchar_t*, ...);
158 int __cdecl __MINGW_NOTHROW vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
159 #ifndef __NO_INLINE__
160 __CRT_INLINE int __cdecl __MINGW_NOTHROW
161 vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
162 { return _vsnwprintf ( s, n, format, arg);}
164 int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST);
165 int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__,
166 const wchar_t * __restrict__, __VALIST);
167 int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
168 const wchar_t * __restrict__, __VALIST);
171 #define _WSTDIO_DEFINED
172 #endif /* _WSTDIO_DEFINED */
174 #ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */
175 _CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int);
176 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int);
177 _CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**);
178 #if !defined __NO_ISOCEXT /* in libmingwex.a */
179 float __cdecl __MINGW_NOTHROW wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
180 long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
181 #endif /* __NO_ISOCEXT */
183 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*);
184 _CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*);
185 _CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
186 _CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*);
187 _CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
188 _CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
189 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t);
191 #define _WSTDLIB_DEFINED
192 #endif /* _WSTDLIB_DEFINED */
194 #ifndef _WTIME_DEFINED
195 #ifndef __STRICT_ANSI__
197 /* wide function prototypes, also declared in time.h */
198 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime (const struct tm*);
199 #if __MSVCRT_VERSION__ < 0x0800
200 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t*);
202 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate (wchar_t*);
203 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime (wchar_t*);
204 #if __MSVCRT_VERSION__ >= 0x601
205 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*);
207 #if __MSVCRT_VERSION__ >= 0x0800
208 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime32 (const __time32_t*);
209 #ifndef _USE_32BIT_TIME_T
210 _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime64 (_v)); }
212 _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime32 (_v)); }
216 #endif /* __MSVCRT__ */
217 #endif /* __STRICT_ANSI__ */
218 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
219 #define _WTIME_DEFINED
220 #endif /* _WTIME_DEFINED */
223 #ifndef _WSTRING_DEFINED
225 * Unicode versions of the standard string calls.
228 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*);
229 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t);
230 _CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*);
231 _CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*);
232 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*);
233 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*);
234 /* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */
235 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*);
236 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t);
237 _CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t);
238 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t);
239 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*);
240 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t);
241 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*);
242 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*);
243 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
244 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
246 #ifndef __STRICT_ANSI__
248 * Unicode versions of non-ANSI functions provided by CRTDLL.
251 /* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
252 #define _wcscmpi _wcsicmp
254 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
255 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*);
256 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*);
257 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
258 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
259 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t);
260 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
261 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
262 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
265 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t);
266 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
267 #if __MSVCRT_VERSION__ >= 0x0700
268 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
269 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
274 /* NOTE: There is no _wcscmpi, but this is for compatibility. */
275 int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t *, const wchar_t *);
276 #ifndef __NO_INLINE__
277 __CRT_INLINE int __cdecl __MINGW_NOTHROW
278 wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
279 {return _wcsicmp (__ws1, __ws2);}
281 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
282 _CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*);
283 _CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*);
284 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
285 _CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t);
286 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
287 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
288 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
289 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
290 #endif /* Not _NO_OLDNAMES */
292 #endif /* Not strict ANSI */
294 #define _WSTRING_DEFINED
295 #endif /* _WSTRING_DEFINED */
297 /* These are resolved by -lmingwex. Alternatively, they can be resolved by
298 adding -lmsvcp60 to your command line, which will give you the VC++
299 versions of these functions. If you want the latter and don't have
300 msvcp60.dll in your windows system directory, you can easily obtain
301 it with a search from your favorite search engine. */
302 #ifndef __STRICT_ANSI__
303 typedef wchar_t _Wint_t;
306 typedef int mbstate_t;
308 wint_t __cdecl __MINGW_NOTHROW btowc(int);
309 size_t __cdecl __MINGW_NOTHROW mbrlen(const char * __restrict__, size_t,
310 mbstate_t * __restrict__);
311 size_t __cdecl __MINGW_NOTHROW mbrtowc(wchar_t * __restrict__, const char * __restrict__,
312 size_t, mbstate_t * __restrict__);
313 size_t __cdecl __MINGW_NOTHROW mbsrtowcs(wchar_t * __restrict__, const char ** __restrict__,
314 size_t, mbstate_t * __restrict__);
315 size_t __cdecl __MINGW_NOTHROW wcrtomb(char * __restrict__, wchar_t,
316 mbstate_t * __restrict__);
317 size_t __cdecl __MINGW_NOTHROW wcsrtombs(char * __restrict__, const wchar_t ** __restrict__,
318 size_t, mbstate_t * __restrict__);
319 int __cdecl __MINGW_NOTHROW wctob(wint_t);
321 #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
322 int __cdecl __MINGW_NOTHROW fwide(FILE*, int);
323 int __cdecl __MINGW_NOTHROW mbsinit(const mbstate_t*);
324 #ifndef __NO_INLINE__
325 __CRT_INLINE int __cdecl __MINGW_NOTHROW fwide(FILE* __UNUSED_PARAM(stream),
327 {return mode;} /* Nothing to do */
328 __CRT_INLINE int __cdecl __MINGW_NOTHROW mbsinit(const mbstate_t* __UNUSED_PARAM(ps))
331 wchar_t* __cdecl __MINGW_NOTHROW wmemset(wchar_t *, wchar_t, size_t);
332 wchar_t* __cdecl __MINGW_NOTHROW wmemchr(const wchar_t*, wchar_t, size_t);
333 int wmemcmp(const wchar_t*, const wchar_t *, size_t);
334 wchar_t* __cdecl __MINGW_NOTHROW wmemcpy(wchar_t* __restrict__,
335 const wchar_t* __restrict__,
337 wchar_t* __cdecl __MINGW_NOTHROW wmemmove(wchar_t* s1, const wchar_t *, size_t);
338 long long __cdecl __MINGW_NOTHROW wcstoll(const wchar_t * __restrict__,
339 wchar_t** __restrict__, int);
340 unsigned long long __cdecl __MINGW_NOTHROW wcstoull(const wchar_t * __restrict__,
341 wchar_t ** __restrict__, int);
342 #endif /* __NO_ISOCEXT */
344 #ifndef __STRICT_ANSI__
345 /* non-ANSI wide char functions from io.h, direct.h, sys/stat.h and locale.h. */
347 #ifndef _FSIZE_T_DEFINED
348 typedef unsigned long _fsize_t;
349 #define _FSIZE_T_DEFINED
352 #ifndef _WFINDDATA_T_DEFINED
353 struct _wfinddata_t {
355 time_t time_create; /* -1 for FAT file systems */
356 time_t time_access; /* -1 for FAT file systems */
359 wchar_t name[260]; /* may include spaces. */
361 struct _wfinddatai64_t {
369 #if __MSVCRT_VERSION__ >= 0x0601
370 struct __wfinddata64_t {
372 __time64_t time_create;
373 __time64_t time_access;
374 __time64_t time_write;
375 /* 8 bytes are returned so it can't be _fsize_t */
380 #if __MSVCRT_VERSION__ >= 0x0800
382 struct __wfinddata32_t {
384 __time32_t time_create;
385 __time32_t time_access;
386 __time32_t time_write;
388 wchar_t name[FILENAME_MAX];
391 struct _wfinddata32i64_t {
393 __time32_t time_create;
394 __time32_t time_access;
395 __time32_t time_write;
397 wchar_t name[FILENAME_MAX];
400 struct _wfinddata64i32_t {
402 __time64_t time_create;
403 __time64_t time_access;
404 __time64_t time_write;
406 wchar_t name[FILENAME_MAX];
408 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
409 #define _WFINDDATA_T_DEFINED
412 /* Wide character versions. Also defined in io.h. */
413 /* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also
414 applies to other wide character versions? */
415 #if !defined (_WIO_DEFINED)
416 #if defined (__MSVCRT__)
417 #include <stdint.h> /* For intptr_t. */
418 _CRTIMP int __cdecl __MINGW_NOTHROW _waccess (const wchar_t*, int);
419 _CRTIMP int __cdecl __MINGW_NOTHROW _wchmod (const wchar_t*, int);
420 _CRTIMP int __cdecl __MINGW_NOTHROW _wcreat (const wchar_t*, int);
421 #if __MSVCRT_VERSION__ < 0x0800
422 _CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct _wfinddata_t *);
423 _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext (long, struct _wfinddata_t *);
425 _CRTIMP int __cdecl __MINGW_NOTHROW _wunlink (const wchar_t*);
426 _CRTIMP int __cdecl __MINGW_NOTHROW _wopen (const wchar_t*, int, ...);
427 _CRTIMP int __cdecl __MINGW_NOTHROW _wsopen (const wchar_t*, int, int, ...);
428 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wmktemp (wchar_t*);
429 #if __MSVCRT_VERSION__ < 0x0800
430 _CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
431 _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64 (long, struct _wfinddatai64_t*);
433 _CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const wchar_t*, struct _wfinddata32i64_t*);
434 _CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst64i32 (const wchar_t*, struct _wfinddata64i32_t*);
435 _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32i64 (long, struct _wfinddata32i64_t*);
436 _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext64i32 (long, struct _wfinddata64i32_t*);
437 #endif /* __MSVCRT_VERSION__ < 0x0800 */
438 #if __MSVCRT_VERSION__ >= 0x0601
439 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*);
440 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*);
441 #endif /* __MSVCRT_VERSION__ >= 0x0601 */
442 #if __MSVCRT_VERSION__ >= 0x0800
443 _CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t*, struct __wfinddata32_t*);
444 _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32 (long, struct __wfinddata32_t*);
445 #ifndef _USE_32BIT_TIME_T
446 _CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t* _v1, struct _wfinddata_t* _v2) { return(_wfindfirst64i32 (_v1,(struct _wfinddata64i32_t*)_v2)); }
447 _CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext (long _v1, struct _wfinddata_t* _v2) { return(_wfindnext64i32 (_v1,(struct _wfinddata64i32_t*)_v2)); }
448 _CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, struct _wfinddatai64_t* _v2) { return(_wfindfirst64 (_v1,(struct __wfinddata64_t*)_v2)); }
449 _CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnexti64 (long _v1, struct _wfinddatai64_t* _v2) { return(_wfindnext64 (_v1,(struct __wfinddata64_t*)_v2)); }
451 _CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t* _v1, struct _wfinddata_t* _v2) { return(_wfindfirst32 (_v1,(struct __wfinddata32_t*)_v2)); }
452 _CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext (long _v1, struct _wfinddata_t* _v2) { return(_wfindnext32 (_v1,(struct __wfinddata32_t*)_v2)); }
453 _CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, struct _wfinddatai64_t* _v2) { return(_wfindfirst32i64 (_v1,(struct _wfinddata32i64_t*)_v2)); }
454 _CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnexti64 (long _v1, struct _wfinddatai64_t* _v2) { return(_wfindnext32i64 (_v1,(struct _wfinddata32i64_t*)_v2)); }
455 #endif /* !_USE_32BIT_TIME_T*/
456 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
458 #endif /* defined (__MSVCRT__) */
460 #endif /* _WIO_DEFINED */
462 #ifndef _WDIRECT_DEFINED
463 /* Also in direct.h */
465 _CRTIMP int __cdecl __MINGW_NOTHROW _wchdir (const wchar_t*);
466 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd (wchar_t*, int);
467 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd (int, wchar_t*, int);
468 _CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir (const wchar_t*);
469 _CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir (const wchar_t*);
470 #endif /* __MSVCRT__ */
471 #define _WDIRECT_DEFINED
472 #endif /* _WDIRECT_DEFINED */
474 #ifndef _STAT_DEFINED
476 * The structure manipulated and returned by stat and fstat.
478 * NOTE: If called on a directory the values in the time fields are not only
479 * invalid, they will cause localtime et. al. to return NULL. And calling
480 * asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
484 _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
485 _ino_t st_ino; /* Always zero ? */
486 _mode_t st_mode; /* See above constants */
487 short st_nlink; /* Number of links. */
488 short st_uid; /* User: Maybe significant on NT ? */
489 short st_gid; /* Group: Ditto */
490 _dev_t st_rdev; /* Seems useless (not even filled in) */
491 _off_t st_size; /* File size in bytes */
492 time_t st_atime; /* Accessed date (always 00:00 hrs local
494 time_t st_mtime; /* Modified time */
495 time_t st_ctime; /* Creation time */
499 /* NOTE: Must be the same as _stat above. */
502 dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
503 ino_t st_ino; /* Always zero ? */
504 mode_t st_mode; /* See above constants */
505 short st_nlink; /* Number of links. */
506 short st_uid; /* User: Maybe significant on NT ? */
507 short st_gid; /* Group: Ditto */
508 dev_t st_rdev; /* Seems useless (not even filled in) */
509 off_t st_size; /* File size in bytes */
510 time_t st_atime; /* Accessed date (always 00:00 hrs local
512 time_t st_mtime; /* Modified time */
513 time_t st_ctime; /* Creation time */
515 #endif /* _NO_OLDNAMES */
517 #if defined (__MSVCRT__)
521 unsigned short st_mode;
532 #if __MSVCRT_VERSION__ >= 0x0601
547 #endif /* __MSVCRT_VERSION__ >= 0x0601*/
549 #if __MSVCRT_VERSION__ >= 0x0800
590 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
592 #endif /* __MSVCRT__ */
593 #define _STAT_DEFINED
594 #endif /* _STAT_DEFINED */
596 #if !defined ( _WSTAT_DEFINED)
597 /* also declared in sys/stat.h */
598 #if defined __MSVCRT__
599 #if __MSVCRT_VERSION__ < 0x0800
600 _CRTIMP int __cdecl __MINGW_NOTHROW _wstat (const wchar_t*, struct _stat*);
601 _CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*);
602 #endif /* __MSVCRT_VERSION__ < 0x0800 */
603 #if __MSVCRT_VERSION__ >= 0x0601
604 _CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*);
605 #endif /* __MSVCRT_VERSION__ >= 0x0601 */
606 #if __MSVCRT_VERSION__ >= 0x0800
607 _CRTIMP int __cdecl __MINGW_NOTHROW _wstat32 (const wchar_t*, struct __stat32*);
608 _CRTIMP int __cdecl __MINGW_NOTHROW _wstat32i64 (const wchar_t*, struct _stat32i64*);
609 _CRTIMP int __cdecl __MINGW_NOTHROW _wstat64i32 (const wchar_t*, struct _stat64i32*);
610 #ifndef _USE_32BIT_TIME_T
611 _CRTALIAS int __cdecl __MINGW_NOTHROW _wstat (const wchar_t* _v1, struct _stat* _v2) { return(_wstat64i32 (_v1,(struct _stat64i32*)_v2)); }
612 _CRTALIAS int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t* _v1, struct _stati64* _v2) { return(_wstat64 (_v1,(struct __stat64*)_v2)); }
614 _CRTALIAS int __cdecl __MINGW_NOTHROW _wstat (const wchar_t* _v1, struct _stat* _v2) { return(_wstat32 (_v1,(struct __stat32*)_v2)); }
615 _CRTALIAS int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t* _v1, struct _stati64* _v2) { return(_wstat32i64 (_v1,(struct _stat32i64*)_v2)); }
616 #endif /* !_USE_32BIT_TIME_T */
617 #endif /* __MSVCRT_VERSION__ >= 0x0800 */
618 #endif /* __MSVCRT__ */
619 #define _WSTAT_DEFINED
620 #endif /* ! _WSTAT_DEFIND */
622 #ifndef _WLOCALE_DEFINED /* also declared in locale.h */
623 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale (int, const wchar_t*);
624 #define _WLOCALE_DEFINED
627 #ifndef _WPROCESS_DEFINED /* also declared in process.h */
628 #include <stdint.h> /* For intptr_t. */
629 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecl (const wchar_t*, const wchar_t*, ...);
630 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecle (const wchar_t*, const wchar_t*, ...);
631 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclp (const wchar_t*, const wchar_t*, ...);
632 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclpe (const wchar_t*, const wchar_t*, ...);
633 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecv (const wchar_t*, const wchar_t* const*);
634 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecve (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
635 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvp (const wchar_t*, const wchar_t* const*);
636 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvpe (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
638 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnl (int, const wchar_t*, const wchar_t*, ...);
639 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnle (int, const wchar_t*, const wchar_t*, ...);
640 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlp (int, const wchar_t*, const wchar_t*, ...);
641 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlpe (int, const wchar_t*, const wchar_t*, ...);
642 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnv (int, const wchar_t*, const wchar_t* const*);
643 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
644 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvp (int, const wchar_t*, const wchar_t* const*);
645 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
647 #define _WPROCESS_DEFINED
649 #endif /* ! __STRICT_ANSI__ */
653 #endif /* ! RC_INVOKED */
654 #endif /* ! _WCHAR_H */