|
1 /* |
|
2 * wchar.h |
|
3 * This file has no copyright assigned and is placed in the Public Domain. |
|
4 * This file is a part of the mingw-runtime package. |
|
5 * No warranty is given; refer to the file DISCLAIMER within the package. |
|
6 * |
|
7 * Defines of all functions for supporting wide characters. Actually it |
|
8 * just includes all those headers, which is not a good thing to do from a |
|
9 * processing time point of view, but it does mean that everything will be |
|
10 * in sync. |
|
11 * |
|
12 */ |
|
13 |
|
14 #ifndef _WCHAR_H_ |
|
15 #define _WCHAR_H_ |
|
16 |
|
17 /* All the headers include this file. */ |
|
18 #include <_mingw.h> |
|
19 |
|
20 #ifndef RC_INVOKED |
|
21 |
|
22 #define __need_size_t |
|
23 #define __need_wint_t |
|
24 #define __need_wchar_t |
|
25 #define __need_NULL |
|
26 #include <stddef.h> |
|
27 |
|
28 #ifndef __VALIST |
|
29 #if defined __GNUC__ && __GNUC__ >= 3 |
|
30 #define __need___va_list |
|
31 #include <stdarg.h> |
|
32 #define __VALIST __builtin_va_list |
|
33 #else |
|
34 #define __VALIST char* |
|
35 #endif |
|
36 #endif |
|
37 |
|
38 #endif /* Not RC_INVOKED */ |
|
39 |
|
40 /* |
|
41 * MSDN says that isw* char classifications are in wchar.h and wctype.h. |
|
42 * Although the wctype names are ANSI, their exposure in this header is |
|
43 * not. |
|
44 */ |
|
45 #include <wctype.h> |
|
46 |
|
47 #ifndef __STRICT_ANSI__ |
|
48 /* This is necessary to support the the non-ANSI wchar declarations |
|
49 here. */ |
|
50 #include <sys/types.h> |
|
51 #endif /* __STRICT_ANSI__ */ |
|
52 |
|
53 #define WCHAR_MIN 0 |
|
54 #define WCHAR_MAX 0xffff |
|
55 |
|
56 #ifndef WEOF |
|
57 #define WEOF (wchar_t)(0xFFFF) |
|
58 #endif |
|
59 |
|
60 #ifndef RC_INVOKED |
|
61 |
|
62 #ifdef __cplusplus |
|
63 extern "C" { |
|
64 #endif |
|
65 |
|
66 #ifndef _FILE_DEFINED /* Also in stdio.h */ |
|
67 #define _FILE_DEFINED |
|
68 typedef struct _iobuf |
|
69 { |
|
70 char* _ptr; |
|
71 int _cnt; |
|
72 char* _base; |
|
73 int _flag; |
|
74 int _file; |
|
75 int _charbuf; |
|
76 int _bufsiz; |
|
77 char* _tmpfname; |
|
78 } FILE; |
|
79 #endif /* Not _FILE_DEFINED */ |
|
80 |
|
81 #ifndef _TIME_T_DEFINED /* Also in time.h */ |
|
82 typedef long time_t; |
|
83 #define _TIME_T_DEFINED |
|
84 #endif |
|
85 |
|
86 #ifndef _TM_DEFINED /* Also in time.h */ |
|
87 struct tm { |
|
88 int tm_sec; /* seconds after the minute - [0,59] */ |
|
89 int tm_min; /* minutes after the hour - [0,59] */ |
|
90 int tm_hour; /* hours since midnight - [0,23] */ |
|
91 int tm_mday; /* day of the month - [1,31] */ |
|
92 int tm_mon; /* months since January - [0,11] */ |
|
93 int tm_year; /* years since 1900 */ |
|
94 int tm_wday; /* days since Sunday - [0,6] */ |
|
95 int tm_yday; /* days since January 1 - [0,365] */ |
|
96 int tm_isdst; /* daylight savings time flag */ |
|
97 }; |
|
98 #define _TM_DEFINED |
|
99 #endif |
|
100 |
|
101 #ifndef _WSTDIO_DEFINED |
|
102 /* Also in stdio.h - keep in sync */ |
|
103 _CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...); |
|
104 _CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...); |
|
105 _CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...); |
|
106 _CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...); |
|
107 _CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST); |
|
108 _CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST); |
|
109 _CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST); |
|
110 _CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST); |
|
111 _CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...); |
|
112 _CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...); |
|
113 _CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...); |
|
114 _CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*); |
|
115 _CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*); |
|
116 _CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*); |
|
117 |
|
118 #ifdef __MSVCRT__ |
|
119 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*); |
|
120 _CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*); |
|
121 _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*); |
|
122 _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void); |
|
123 _CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*); |
|
124 _CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t); |
|
125 #ifndef __STRICT_ANSI__ |
|
126 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*); |
|
127 _CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*); |
|
128 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, wchar_t *); |
|
129 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*); |
|
130 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*); |
|
131 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int); |
|
132 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*); |
|
133 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*); |
|
134 _CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*); |
|
135 _CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*); |
|
136 _CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*); |
|
137 _CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*); |
|
138 #endif /* __STRICT_ANSI__ */ |
|
139 #endif /* __MSVCRT__ */ |
|
140 |
|
141 #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ |
|
142 int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); |
|
143 __CRT_INLINE int __cdecl __MINGW_NOTHROW |
|
144 vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg) |
|
145 { return _vsnwprintf ( s, n, format, arg);} |
|
146 int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST); |
|
147 int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__, |
|
148 const wchar_t * __restrict__, __VALIST); |
|
149 int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__, |
|
150 const wchar_t * __restrict__, __VALIST); |
|
151 #endif |
|
152 |
|
153 #define _WSTDIO_DEFINED |
|
154 #endif /* _WSTDIO_DEFINED */ |
|
155 |
|
156 #ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */ |
|
157 _CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int); |
|
158 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int); |
|
159 _CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**); |
|
160 #if !defined __NO_ISOCEXT /* in libmingwex.a */ |
|
161 float __cdecl __MINGW_NOTHROW wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__); |
|
162 long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); |
|
163 #endif /* __NO_ISOCEXT */ |
|
164 #ifdef __MSVCRT__ |
|
165 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*); |
|
166 _CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*); |
|
167 _CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); |
|
168 _CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*); |
|
169 _CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); |
|
170 _CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); |
|
171 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t); |
|
172 #endif |
|
173 #define _WSTDLIB_DEFINED |
|
174 #endif /* _WSTDLIB_DEFINED */ |
|
175 |
|
176 #ifndef _WTIME_DEFINED |
|
177 #ifndef __STRICT_ANSI__ |
|
178 #ifdef __MSVCRT__ |
|
179 /* wide function prototypes, also declared in time.h */ |
|
180 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime (const struct tm*); |
|
181 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t*); |
|
182 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate (wchar_t*); |
|
183 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime (wchar_t*); |
|
184 #if __MSVCRT_VERSION__ >= 0x601 |
|
185 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*); |
|
186 #endif |
|
187 #endif /* __MSVCRT__ */ |
|
188 #endif /* __STRICT_ANSI__ */ |
|
189 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); |
|
190 #define _WTIME_DEFINED |
|
191 #endif /* _WTIME_DEFINED */ |
|
192 |
|
193 |
|
194 #ifndef _WSTRING_DEFINED |
|
195 /* |
|
196 * Unicode versions of the standard string calls. |
|
197 * Also in string.h. |
|
198 */ |
|
199 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*); |
|
200 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t); |
|
201 _CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*); |
|
202 _CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*); |
|
203 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*); |
|
204 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*); |
|
205 /* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */ |
|
206 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*); |
|
207 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t); |
|
208 _CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t); |
|
209 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t); |
|
210 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*); |
|
211 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t); |
|
212 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*); |
|
213 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*); |
|
214 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*); |
|
215 _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t); |
|
216 |
|
217 #ifndef __STRICT_ANSI__ |
|
218 /* |
|
219 * Unicode versions of non-ANSI functions provided by CRTDLL. |
|
220 */ |
|
221 |
|
222 /* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */ |
|
223 #define _wcscmpi _wcsicmp |
|
224 |
|
225 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*); |
|
226 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*); |
|
227 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*); |
|
228 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*); |
|
229 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t); |
|
230 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t); |
|
231 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*); |
|
232 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t); |
|
233 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*); |
|
234 |
|
235 #ifdef __MSVCRT__ |
|
236 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t); |
|
237 _CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t); |
|
238 #if __MSVCRT_VERSION__ >= 0x0700 |
|
239 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int); |
|
240 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*); |
|
241 #endif |
|
242 #endif |
|
243 |
|
244 #ifndef _NO_OLDNAMES |
|
245 /* NOTE: There is no _wcscmpi, but this is for compatibility. */ |
|
246 __CRT_INLINE int __cdecl __MINGW_NOTHROW |
|
247 wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2) |
|
248 {return _wcsicmp (__ws1, __ws2);} |
|
249 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*); |
|
250 _CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*); |
|
251 _CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*); |
|
252 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*); |
|
253 _CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t); |
|
254 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t); |
|
255 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*); |
|
256 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t); |
|
257 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*); |
|
258 #endif /* Not _NO_OLDNAMES */ |
|
259 |
|
260 #endif /* Not strict ANSI */ |
|
261 |
|
262 #define _WSTRING_DEFINED |
|
263 #endif /* _WSTRING_DEFINED */ |
|
264 |
|
265 /* These are resolved by -lmingwex. Alternatively, they can be resolved by |
|
266 adding -lmsvcp60 to your command line, which will give you the VC++ |
|
267 versions of these functions. If you want the latter and don't have |
|
268 msvcp60.dll in your windows system directory, you can easily obtain |
|
269 it with a search from your favorite search engine. */ |
|
270 #ifndef __STRICT_ANSI__ |
|
271 typedef wchar_t _Wint_t; |
|
272 #endif |
|
273 |
|
274 typedef int mbstate_t; |
|
275 |
|
276 wint_t __cdecl __MINGW_NOTHROW btowc(int); |
|
277 size_t __cdecl __MINGW_NOTHROW mbrlen(const char * __restrict__, size_t, |
|
278 mbstate_t * __restrict__); |
|
279 size_t __cdecl __MINGW_NOTHROW mbrtowc(wchar_t * __restrict__, const char * __restrict__, |
|
280 size_t, mbstate_t * __restrict__); |
|
281 size_t __cdecl __MINGW_NOTHROW mbsrtowcs(wchar_t * __restrict__, const char ** __restrict__, |
|
282 size_t, mbstate_t * __restrict__); |
|
283 size_t __cdecl __MINGW_NOTHROW wcrtomb(char * __restrict__, wchar_t, |
|
284 mbstate_t * __restrict__); |
|
285 size_t __cdecl __MINGW_NOTHROW wcsrtombs(char * __restrict__, const wchar_t ** __restrict__, |
|
286 size_t, mbstate_t * __restrict__); |
|
287 int __cdecl __MINGW_NOTHROW wctob(wint_t); |
|
288 |
|
289 #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */ |
|
290 __CRT_INLINE int __cdecl __MINGW_NOTHROW fwide(FILE* __UNUSED_PARAM(stream), |
|
291 int __UNUSED_PARAM(mode)) |
|
292 {return -1;} /* limited to byte orientation */ |
|
293 __CRT_INLINE int __cdecl __MINGW_NOTHROW mbsinit(const mbstate_t* __UNUSED_PARAM(ps)) |
|
294 {return 1;} |
|
295 wchar_t* __cdecl __MINGW_NOTHROW wmemset(wchar_t *, wchar_t, size_t); |
|
296 wchar_t* __cdecl __MINGW_NOTHROW wmemchr(const wchar_t*, wchar_t, size_t); |
|
297 int wmemcmp(const wchar_t*, const wchar_t *, size_t); |
|
298 wchar_t* __cdecl __MINGW_NOTHROW wmemcpy(wchar_t* __restrict__, |
|
299 const wchar_t* __restrict__, |
|
300 size_t); |
|
301 wchar_t* __cdecl __MINGW_NOTHROW wmemmove(wchar_t* s1, const wchar_t *, size_t); |
|
302 long long __cdecl __MINGW_NOTHROW wcstoll(const wchar_t * __restrict__, |
|
303 wchar_t** __restrict__, int); |
|
304 unsigned long long __cdecl __MINGW_NOTHROW wcstoull(const wchar_t * __restrict__, |
|
305 wchar_t ** __restrict__, int); |
|
306 #endif /* __NO_ISOCEXT */ |
|
307 |
|
308 #ifndef __STRICT_ANSI__ |
|
309 /* non-ANSI wide char functions from io.h, direct.h, sys/stat.h and locale.h. */ |
|
310 |
|
311 #ifndef _FSIZE_T_DEFINED |
|
312 typedef unsigned long _fsize_t; |
|
313 #define _FSIZE_T_DEFINED |
|
314 #endif |
|
315 |
|
316 #ifndef _WFINDDATA_T_DEFINED |
|
317 struct _wfinddata_t { |
|
318 unsigned attrib; |
|
319 time_t time_create; /* -1 for FAT file systems */ |
|
320 time_t time_access; /* -1 for FAT file systems */ |
|
321 time_t time_write; |
|
322 _fsize_t size; |
|
323 wchar_t name[260]; /* may include spaces. */ |
|
324 }; |
|
325 struct _wfinddatai64_t { |
|
326 unsigned attrib; |
|
327 time_t time_create; |
|
328 time_t time_access; |
|
329 time_t time_write; |
|
330 __int64 size; |
|
331 wchar_t name[260]; |
|
332 }; |
|
333 #if __MSVCRT_VERSION__ >= 0x0601 |
|
334 struct __wfinddata64_t { |
|
335 unsigned attrib; |
|
336 __time64_t time_create; |
|
337 __time64_t time_access; |
|
338 __time64_t time_write; |
|
339 /* 8 bytes are returned so it can't be _fsize_t */ |
|
340 __int64 size; |
|
341 wchar_t name[260]; |
|
342 }; |
|
343 #endif |
|
344 #define _WFINDDATA_T_DEFINED |
|
345 #endif |
|
346 |
|
347 /* Wide character versions. Also defined in io.h. */ |
|
348 /* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also |
|
349 applies to other wide character versions? */ |
|
350 #if !defined (_WIO_DEFINED) |
|
351 #if defined (__MSVCRT__) |
|
352 #include <stdint.h> /* For intptr_t. */ |
|
353 _CRTIMP int __cdecl __MINGW_NOTHROW _waccess (const wchar_t*, int); |
|
354 _CRTIMP int __cdecl __MINGW_NOTHROW _wchmod (const wchar_t*, int); |
|
355 _CRTIMP int __cdecl __MINGW_NOTHROW _wcreat (const wchar_t*, int); |
|
356 _CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct _wfinddata_t *); |
|
357 _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext (long, struct _wfinddata_t *); |
|
358 _CRTIMP int __cdecl __MINGW_NOTHROW _wunlink (const wchar_t*); |
|
359 _CRTIMP int __cdecl __MINGW_NOTHROW _wopen (const wchar_t*, int, ...); |
|
360 _CRTIMP int __cdecl __MINGW_NOTHROW _wsopen (const wchar_t*, int, int, ...); |
|
361 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wmktemp (wchar_t*); |
|
362 _CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*); |
|
363 _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64 (long, struct _wfinddatai64_t*); |
|
364 #if __MSVCRT_VERSION__ >= 0x0601 |
|
365 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*); |
|
366 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*); |
|
367 #endif /* __MSVCRT_VERSION__ >= 0x0601 */ |
|
368 #endif /* defined (__MSVCRT__) */ |
|
369 #define _WIO_DEFINED |
|
370 #endif /* _WIO_DEFINED */ |
|
371 |
|
372 #ifndef _WDIRECT_DEFINED |
|
373 /* Also in direct.h */ |
|
374 #ifdef __MSVCRT__ |
|
375 _CRTIMP int __cdecl __MINGW_NOTHROW _wchdir (const wchar_t*); |
|
376 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd (wchar_t*, int); |
|
377 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd (int, wchar_t*, int); |
|
378 _CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir (const wchar_t*); |
|
379 _CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir (const wchar_t*); |
|
380 #endif /* __MSVCRT__ */ |
|
381 #define _WDIRECT_DEFINED |
|
382 #endif /* _WDIRECT_DEFINED */ |
|
383 |
|
384 #ifndef _STAT_DEFINED |
|
385 /* |
|
386 * The structure manipulated and returned by stat and fstat. |
|
387 * |
|
388 * NOTE: If called on a directory the values in the time fields are not only |
|
389 * invalid, they will cause localtime et. al. to return NULL. And calling |
|
390 * asctime with a NULL pointer causes an Invalid Page Fault. So watch it! |
|
391 */ |
|
392 struct _stat |
|
393 { |
|
394 _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */ |
|
395 _ino_t st_ino; /* Always zero ? */ |
|
396 _mode_t st_mode; /* See above constants */ |
|
397 short st_nlink; /* Number of links. */ |
|
398 short st_uid; /* User: Maybe significant on NT ? */ |
|
399 short st_gid; /* Group: Ditto */ |
|
400 _dev_t st_rdev; /* Seems useless (not even filled in) */ |
|
401 _off_t st_size; /* File size in bytes */ |
|
402 time_t st_atime; /* Accessed date (always 00:00 hrs local |
|
403 * on FAT) */ |
|
404 time_t st_mtime; /* Modified time */ |
|
405 time_t st_ctime; /* Creation time */ |
|
406 }; |
|
407 |
|
408 #ifndef _NO_OLDNAMES |
|
409 /* NOTE: Must be the same as _stat above. */ |
|
410 struct stat |
|
411 { |
|
412 dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */ |
|
413 ino_t st_ino; /* Always zero ? */ |
|
414 mode_t st_mode; /* See above constants */ |
|
415 short st_nlink; /* Number of links. */ |
|
416 short st_uid; /* User: Maybe significant on NT ? */ |
|
417 short st_gid; /* Group: Ditto */ |
|
418 dev_t st_rdev; /* Seems useless (not even filled in) */ |
|
419 off_t st_size; /* File size in bytes */ |
|
420 time_t st_atime; /* Accessed date (always 00:00 hrs local |
|
421 * on FAT) */ |
|
422 time_t st_mtime; /* Modified time */ |
|
423 time_t st_ctime; /* Creation time */ |
|
424 }; |
|
425 #endif /* _NO_OLDNAMES */ |
|
426 |
|
427 #if defined (__MSVCRT__) |
|
428 struct _stati64 { |
|
429 _dev_t st_dev; |
|
430 _ino_t st_ino; |
|
431 unsigned short st_mode; |
|
432 short st_nlink; |
|
433 short st_uid; |
|
434 short st_gid; |
|
435 _dev_t st_rdev; |
|
436 __int64 st_size; |
|
437 time_t st_atime; |
|
438 time_t st_mtime; |
|
439 time_t st_ctime; |
|
440 }; |
|
441 |
|
442 #if __MSVCRT_VERSION__ >= 0x0601 |
|
443 struct __stat64 |
|
444 { |
|
445 _dev_t st_dev; |
|
446 _ino_t st_ino; |
|
447 _mode_t st_mode; |
|
448 short st_nlink; |
|
449 short st_uid; |
|
450 short st_gid; |
|
451 _dev_t st_rdev; |
|
452 __int64 st_size; |
|
453 __time64_t st_atime; |
|
454 __time64_t st_mtime; |
|
455 __time64_t st_ctime; |
|
456 }; |
|
457 #endif /* __MSVCRT_VERSION__ */ |
|
458 #endif /* __MSVCRT__ */ |
|
459 #define _STAT_DEFINED |
|
460 #endif /* _STAT_DEFINED */ |
|
461 |
|
462 #if !defined ( _WSTAT_DEFINED) |
|
463 /* also declared in sys/stat.h */ |
|
464 #if defined __MSVCRT__ |
|
465 _CRTIMP int __cdecl __MINGW_NOTHROW _wstat (const wchar_t*, struct _stat*); |
|
466 _CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*); |
|
467 #if __MSVCRT_VERSION__ >= 0x0601 |
|
468 _CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*); |
|
469 #endif /* __MSVCRT_VERSION__ >= 0x0601 */ |
|
470 #endif /* __MSVCRT__ */ |
|
471 #define _WSTAT_DEFINED |
|
472 #endif /* ! _WSTAT_DEFIND */ |
|
473 |
|
474 #ifndef _WLOCALE_DEFINED /* also declared in locale.h */ |
|
475 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale (int, const wchar_t*); |
|
476 #define _WLOCALE_DEFINED |
|
477 #endif |
|
478 |
|
479 #endif /* not __STRICT_ANSI__ */ |
|
480 |
|
481 #ifndef _WPROCESS_DEFINED /* also declared in process.h */ |
|
482 _CRTIMP int __cdecl __MINGW_NOTHROW _wexecl (const wchar_t*, const wchar_t*, ...); |
|
483 _CRTIMP int __cdecl __MINGW_NOTHROW _wexecle (const wchar_t*, const wchar_t*, ...); |
|
484 _CRTIMP int __cdecl __MINGW_NOTHROW _wexeclp (const wchar_t*, const wchar_t*, ...); |
|
485 _CRTIMP int __cdecl __MINGW_NOTHROW _wexeclpe (const wchar_t*, const wchar_t*, ...); |
|
486 _CRTIMP int __cdecl __MINGW_NOTHROW _wexecv (const wchar_t*, const wchar_t* const*); |
|
487 _CRTIMP int __cdecl __MINGW_NOTHROW _wexecve (const wchar_t*, const wchar_t* const*, const wchar_t* const*); |
|
488 _CRTIMP int __cdecl __MINGW_NOTHROW _wexecvp (const wchar_t*, const wchar_t* const*); |
|
489 _CRTIMP int __cdecl __MINGW_NOTHROW _wexecvpe (const wchar_t*, const wchar_t* const*, const wchar_t* const*); |
|
490 |
|
491 _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnl (int, const wchar_t*, const wchar_t*, ...); |
|
492 _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnle (int, const wchar_t*, const wchar_t*, ...); |
|
493 _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnlp (int, const wchar_t*, const wchar_t*, ...); |
|
494 _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnlpe (int, const wchar_t*, const wchar_t*, ...); |
|
495 _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnv (int, const wchar_t*, const wchar_t* const*); |
|
496 _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*); |
|
497 _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnvp (int, const wchar_t*, const wchar_t* const*); |
|
498 _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*); |
|
499 |
|
500 #define _WPROCESS_DEFINED |
|
501 #endif |
|
502 |
|
503 #ifdef __cplusplus |
|
504 } /* end of extern "C" */ |
|
505 #endif |
|
506 |
|
507 #endif /* Not RC_INVOKED */ |
|
508 |
|
509 #endif /* not _WCHAR_H_ */ |
|
510 |