4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
24 #define NULL ((void *)0)
29 #define WCHAR_MAX ((wchar_t)-1)
31 #ifndef DECLSPEC_ALIGN
32 # if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
33 # define DECLSPEC_ALIGN(x) __declspec(align(x))
34 # elif defined(__GNUC__)
35 # define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
37 # define DECLSPEC_ALIGN(x)
41 typedef int mbstate_t;
44 #define WEOF (wint_t)(0xFFFF)
47 #ifndef _FSIZE_T_DEFINED
48 typedef __msvcrt_ulong _fsize_t
;
49 #define _FSIZE_T_DEFINED
52 #ifndef _DEV_T_DEFINED
53 typedef unsigned int _dev_t
;
54 #define _DEV_T_DEFINED
57 #ifndef _INO_T_DEFINED
58 typedef unsigned short _ino_t
;
59 #define _INO_T_DEFINED
62 #ifndef _OFF_T_DEFINED
64 #define _OFF_T_DEFINED
80 #endif /* _TM_DEFINED */
95 #endif /* _FILE_DEFINED */
97 #ifndef _WFINDDATA_T_DEFINED
98 #define _WFINDDATA_T_DEFINED
100 struct _wfinddata_t
{
109 struct _wfinddatai64_t
{
114 __int64
DECLSPEC_ALIGN(8) size
;
118 #endif /* _WFINDDATA_T_DEFINED */
120 #ifndef _STAT_DEFINED
121 #define _STAT_DEFINED
126 unsigned short st_mode
;
140 unsigned short st_mode
;
154 unsigned short st_mode
;
168 unsigned short st_mode
;
173 __int64
DECLSPEC_ALIGN(8) st_size
;
182 unsigned short st_mode
;
187 __int64
DECLSPEC_ALIGN(8) st_size
;
192 #endif /* _STAT_DEFINED */
194 /* ASCII char classification table - binary compatible */
195 #define _UPPER 0x0001 /* C1_UPPER */
196 #define _LOWER 0x0002 /* C1_LOWER */
197 #define _DIGIT 0x0004 /* C1_DIGIT */
198 #define _SPACE 0x0008 /* C1_SPACE */
199 #define _PUNCT 0x0010 /* C1_PUNCT */
200 #define _CONTROL 0x0020 /* C1_CNTRL */
201 #define _BLANK 0x0040 /* C1_BLANK */
202 #define _HEX 0x0080 /* C1_XDIGIT */
203 #define _LEADBYTE 0x8000
204 #define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
206 #ifndef _WCTYPE_DEFINED
207 #define _WCTYPE_DEFINED
208 int __cdecl
is_wctype(wint_t,wctype_t);
209 int __cdecl
isleadbyte(int);
210 int __cdecl
iswalnum(wint_t);
211 int __cdecl
iswalpha(wint_t);
212 int __cdecl
iswascii(wint_t);
213 int __cdecl
iswcntrl(wint_t);
214 int __cdecl
iswctype(wint_t,wctype_t);
215 int __cdecl
iswdigit(wint_t);
216 int __cdecl
iswgraph(wint_t);
217 int __cdecl
iswlower(wint_t);
218 int __cdecl
iswprint(wint_t);
219 int __cdecl
iswpunct(wint_t);
220 int __cdecl
iswspace(wint_t);
221 int __cdecl
iswupper(wint_t);
222 int __cdecl
iswxdigit(wint_t);
223 wchar_t __cdecl
towlower(wchar_t);
224 wchar_t __cdecl
towupper(wchar_t);
225 #endif /* _WCTYPE_DEFINED */
227 #ifndef _WDIRECT_DEFINED
228 #define _WDIRECT_DEFINED
229 int __cdecl
_wchdir(const wchar_t*);
230 wchar_t* __cdecl
_wgetcwd(wchar_t*,int);
231 wchar_t* __cdecl
_wgetdcwd(int,wchar_t*,int);
232 int __cdecl
_wmkdir(const wchar_t*);
233 int __cdecl
_wrmdir(const wchar_t*);
234 #endif /* _WDIRECT_DEFINED */
238 int __cdecl
_waccess(const wchar_t*,int);
239 int __cdecl
_wchmod(const wchar_t*,int);
240 int __cdecl
_wcreat(const wchar_t*,int);
241 __msvcrt_long __cdecl
_wfindfirst(const wchar_t*,struct _wfinddata_t
*);
242 __msvcrt_long __cdecl
_wfindfirsti64(const wchar_t*, struct _wfinddatai64_t
*);
243 int __cdecl
_wfindnext(__msvcrt_long
,struct _wfinddata_t
*);
244 int __cdecl
_wfindnexti64(__msvcrt_long
, struct _wfinddatai64_t
*);
245 wchar_t* __cdecl
_wmktemp(wchar_t*);
246 int __cdecl
_wopen(const wchar_t*,int,...);
247 int __cdecl
_wrename(const wchar_t*,const wchar_t*);
248 int __cdecl
_wsopen(const wchar_t*,int,int,...);
249 int __cdecl
_wunlink(const wchar_t*);
250 #endif /* _WIO_DEFINED */
252 #ifndef _WLOCALE_DEFINED
253 #define _WLOCALE_DEFINED
254 wchar_t* __cdecl
_wsetlocale(int,const wchar_t*);
255 #endif /* _WLOCALE_DEFINED */
257 #ifndef _WPROCESS_DEFINED
258 #define _WPROCESS_DEFINED
259 int __cdecl
_wexecl(const wchar_t*,const wchar_t*,...);
260 int __cdecl
_wexecle(const wchar_t*,const wchar_t*,...);
261 int __cdecl
_wexeclp(const wchar_t*,const wchar_t*,...);
262 int __cdecl
_wexeclpe(const wchar_t*,const wchar_t*,...);
263 int __cdecl
_wexecv(const wchar_t*,const wchar_t* const *);
264 int __cdecl
_wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
265 int __cdecl
_wexecvp(const wchar_t*,const wchar_t* const *);
266 int __cdecl
_wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
267 int __cdecl
_wspawnl(int,const wchar_t*,const wchar_t*,...);
268 int __cdecl
_wspawnle(int,const wchar_t*,const wchar_t*,...);
269 int __cdecl
_wspawnlp(int,const wchar_t*,const wchar_t*,...);
270 int __cdecl
_wspawnlpe(int,const wchar_t*,const wchar_t*,...);
271 int __cdecl
_wspawnv(int,const wchar_t*,const wchar_t* const *);
272 int __cdecl
_wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
273 int __cdecl
_wspawnvp(int,const wchar_t*,const wchar_t* const *);
274 int __cdecl
_wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
275 int __cdecl
_wsystem(const wchar_t*);
276 #endif /* _WPROCESS_DEFINED */
278 #ifndef _WSTAT_DEFINED
279 #define _WSTAT_DEFINED
280 int __cdecl
_wstat(const wchar_t*,struct _stat
*);
281 int __cdecl
_wstat32(const wchar_t*, struct _stat32
*);
282 int __cdecl
_wstati64(const wchar_t*,struct _stati64
*);
283 int __cdecl
_wstat64(const wchar_t*,struct _stat64
*);
284 #endif /* _WSTAT_DEFINED */
286 #ifndef _WSTDIO_DEFINED
287 #define _WSTDIO_DEFINED
288 wint_t __cdecl
_fgetwchar(void);
289 wint_t __cdecl
_fputwchar(wint_t);
290 wchar_t* __cdecl
_getws(wchar_t*);
291 int __cdecl
_putws(const wchar_t*);
292 int __cdecl
_snwprintf(wchar_t*,size_t,const wchar_t*,...);
293 int __cdecl
_snwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,...);
294 int __cdecl
_vscwprintf(const wchar_t*,__ms_va_list
);
295 int __cdecl
_vsnwprintf(wchar_t*,size_t,const wchar_t*,__ms_va_list
);
296 int __cdecl
_vsnwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,__ms_va_list
);
297 FILE* __cdecl
_wfdopen(int,const wchar_t*);
298 FILE* __cdecl
_wfopen(const wchar_t*,const wchar_t*);
299 errno_t __cdecl
_wfopen_s(FILE**,const wchar_t*,const wchar_t*);
300 FILE* __cdecl
_wfreopen(const wchar_t*,const wchar_t*,FILE*);
301 FILE* __cdecl
_wfsopen(const wchar_t*,const wchar_t*,int);
302 void __cdecl
_wperror(const wchar_t*);
303 FILE* __cdecl
_wpopen(const wchar_t*,const wchar_t*);
304 int __cdecl
_wremove(const wchar_t*);
305 wchar_t* __cdecl
_wtempnam(const wchar_t*,const wchar_t*);
306 wchar_t* __cdecl
_wtmpnam(wchar_t*);
308 wint_t __cdecl
fgetwc(FILE*);
309 wchar_t* __cdecl
fgetws(wchar_t*,int,FILE*);
310 wint_t __cdecl
fputwc(wint_t,FILE*);
311 int __cdecl
fputws(const wchar_t*,FILE*);
312 int __cdecl
fwprintf(FILE*,const wchar_t*,...);
313 int __cdecl
fwprintf_s(FILE*,const wchar_t*,...);
314 int __cdecl
fputws(const wchar_t*,FILE*);
315 int __cdecl
fwscanf(FILE*,const wchar_t*,...);
316 int __cdecl
fwscanf_s(FILE*,const wchar_t*,...);
317 wint_t __cdecl
getwc(FILE*);
318 wint_t __cdecl
getwchar(void);
319 wchar_t* __cdecl
getws(wchar_t*);
320 wint_t __cdecl
putwc(wint_t,FILE*);
321 wint_t __cdecl
putwchar(wint_t);
322 int __cdecl
putws(const wchar_t*);
323 int __cdecl
swprintf(wchar_t*,const wchar_t*,...);
324 int __cdecl
swprintf_s(wchar_t*,size_t,const wchar_t*,...);
325 int __cdecl
swscanf(const wchar_t*,const wchar_t*,...);
326 int __cdecl
swscanf_s(const wchar_t*,const wchar_t*,...);
327 wint_t __cdecl
ungetwc(wint_t,FILE*);
328 int __cdecl
vfwprintf(FILE*,const wchar_t*,__ms_va_list
);
329 int __cdecl
vfwprintf_s(FILE*,const wchar_t*,__ms_va_list
);
330 int __cdecl
vswprintf(wchar_t*,const wchar_t*,__ms_va_list
);
331 int __cdecl
vswprintf_s(wchar_t*,size_t,const wchar_t*,__ms_va_list
);
332 int __cdecl
vwprintf(const wchar_t*,__ms_va_list
);
333 int __cdecl
vwprintf_s(const wchar_t*,__ms_va_list
);
334 int __cdecl
wprintf(const wchar_t*,...);
335 int __cdecl
wprintf_s(const wchar_t*,...);
336 int __cdecl
wscanf(const wchar_t*,...);
337 int __cdecl
wscanf_s(const wchar_t*,...);
338 #endif /* _WSTDIO_DEFINED */
340 #ifndef _WSTDLIB_DEFINED
341 #define _WSTDLIB_DEFINED
342 wchar_t* __cdecl
_itow(int,wchar_t*,int);
343 wchar_t* __cdecl
_i64tow(__int64
,wchar_t*,int);
344 wchar_t* __cdecl
_ltow(__msvcrt_long
,wchar_t*,int);
345 wchar_t* __cdecl
_ui64tow(unsigned __int64
,wchar_t*,int);
346 wchar_t* __cdecl
_ultow(__msvcrt_ulong
,wchar_t*,int);
347 wchar_t* __cdecl
_wfullpath(wchar_t*,const wchar_t*,size_t);
348 wchar_t* __cdecl
_wgetenv(const wchar_t*);
349 void __cdecl
_wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
350 void __cdecl
_wperror(const wchar_t*);
351 int __cdecl
_wputenv(const wchar_t*);
352 void __cdecl
_wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
353 void __cdecl
_wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
354 errno_t __cdecl
_wsplitpath_s(const wchar_t*,wchar_t*,size_t,wchar_t*,size_t,
355 wchar_t*,size_t,wchar_t*,size_t);
356 int __cdecl
_wsystem(const wchar_t*);
357 double __cdecl
_wtof(const wchar_t*);
358 int __cdecl
_wtoi(const wchar_t*);
359 __int64 __cdecl
_wtoi64(const wchar_t*);
360 __msvcrt_long __cdecl
_wtol(const wchar_t*);
362 size_t __cdecl
mbstowcs(wchar_t*,const char*,size_t);
363 errno_t __cdecl
mbstowcs_s(size_t*,wchar_t*,size_t,const char*,size_t);
364 int __cdecl
mbtowc(wchar_t*,const char*,size_t);
365 double __cdecl
wcstod(const wchar_t*,wchar_t**);
366 __msvcrt_long __cdecl
wcstol(const wchar_t*,wchar_t**,int);
367 size_t __cdecl
wcstombs(char*,const wchar_t*,size_t);
368 errno_t __cdecl
wcstombs_s(size_t*,char*,size_t,const wchar_t*,size_t);
369 __msvcrt_ulong __cdecl
wcstoul(const wchar_t*,wchar_t**,int);
370 int __cdecl
wctomb(char*,wchar_t);
371 #endif /* _WSTDLIB_DEFINED */
373 #ifndef _WSTRING_DEFINED
374 #define _WSTRING_DEFINED
375 wchar_t* __cdecl
_wcsdup(const wchar_t*);
376 int __cdecl
_wcsicmp(const wchar_t*,const wchar_t*);
377 int __cdecl
_wcsicoll(const wchar_t*,const wchar_t*);
378 wchar_t* __cdecl
_wcslwr(wchar_t*);
379 int __cdecl
_wcsnicmp(const wchar_t*,const wchar_t*,size_t);
380 int __cdecl
_wcsnicoll(const wchar_t*,const wchar_t*,size_t);
381 wchar_t* __cdecl
_wcsnset(wchar_t*,wchar_t,size_t);
382 wchar_t* __cdecl
_wcsrev(wchar_t*);
383 wchar_t* __cdecl
_wcsset(wchar_t*,wchar_t);
384 wchar_t* __cdecl
_wcsupr(wchar_t*);
386 wchar_t* __cdecl
wcscat(wchar_t*,const wchar_t*);
387 errno_t __cdecl
wcscat_s(wchar_t*,size_t,const wchar_t*);
388 wchar_t* __cdecl
wcschr(const wchar_t*,wchar_t);
389 int __cdecl
wcscmp(const wchar_t*,const wchar_t*);
390 int __cdecl
wcscoll(const wchar_t*,const wchar_t*);
391 wchar_t* __cdecl
wcscpy(wchar_t*,const wchar_t*);
392 errno_t __cdecl
wcscpy_s(wchar_t*,size_t,const wchar_t*);
393 size_t __cdecl
wcscspn(const wchar_t*,const wchar_t*);
394 size_t __cdecl
wcslen(const wchar_t*);
395 wchar_t* __cdecl
wcsncat(wchar_t*,const wchar_t*,size_t);
396 int __cdecl
wcsncmp(const wchar_t*,const wchar_t*,size_t);
397 wchar_t* __cdecl
wcsncpy(wchar_t*,const wchar_t*,size_t);
398 errno_t __cdecl
wcsncpy_s(wchar_t*,size_t,const wchar_t*,size_t);
399 wchar_t* __cdecl
wcspbrk(const wchar_t*,const wchar_t*);
400 wchar_t* __cdecl
wcsrchr(const wchar_t*,wchar_t wcFor
);
401 size_t __cdecl
wcsspn(const wchar_t*,const wchar_t*);
402 wchar_t* __cdecl
wcsstr(const wchar_t*,const wchar_t*);
403 wchar_t* __cdecl
wcstok(wchar_t*,const wchar_t*);
404 size_t __cdecl
wcsxfrm(wchar_t*,const wchar_t*,size_t);
405 #endif /* _WSTRING_DEFINED */
407 #ifndef _WTIME_DEFINED
408 #define _WTIME_DEFINED
410 #ifdef _USE_32BIT_TIME_T
411 #define _wctime32 _wctime
414 wchar_t* __cdecl
_wasctime(const struct tm
*);
415 size_t __cdecl
wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm
*);
416 wchar_t* __cdecl
_wctime32(const __time32_t
*);
417 wchar_t* __cdecl
_wctime64(const __time64_t
*);
418 wchar_t* __cdecl
_wstrdate(wchar_t*);
419 errno_t __cdecl
_wstrdate_s(wchar_t*,size_t);
420 wchar_t* __cdecl
_wstrtime(wchar_t*);
421 errno_t __cdecl
_wstrtime_s(wchar_t*,size_t);
423 #ifndef _USE_32BIT_TIME_T
424 static inline wchar_t* _wctime(const time_t *t
) { return _wctime64(t
); }
427 #endif /* _WTIME_DEFINED */
429 wchar_t __cdecl
btowc(int);
430 size_t __cdecl
mbrlen(const char *,size_t,mbstate_t*);
431 size_t __cdecl
mbrtowc(wchar_t*,const char*,size_t,mbstate_t*);
432 size_t __cdecl
mbsrtowcs(wchar_t*,const char**,size_t,mbstate_t*);
433 size_t __cdecl
wcrtomb(char*,wchar_t,mbstate_t*);
434 size_t __cdecl
wcsrtombs(char*,const wchar_t**,size_t,mbstate_t*);
435 int __cdecl
wctob(wint_t);
443 #endif /* __WINE_WCHAR_H */