4 * Declarations relating to support for wide characters; many are simply
5 * inherited by (sub-optimal) inclusion of other header files.
9 * Unattributed original source.
10 * Adapted by Rob Savoye <rob@cygnus.com>
11 * Copyright (C) 1997, 1999-2009, 2011, 2015, 2016, MinGW.org Project.
14 * Permission is hereby granted, free of charge, to any person obtaining a
15 * copy of this software and associated documentation files (the "Software"),
16 * to deal in the Software without restriction, including without limitation
17 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 * and/or sell copies of the Software, and to permit persons to whom the
19 * Software is furnished to do so, subject to the following conditions:
21 * The above copyright notice, this permission notice, and the following
22 * disclaimer shall be included in all copies or substantial portions of
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
31 * DEALINGS IN THE SOFTWARE.
35 #pragma GCC system_header
37 /* This header declares prototypes for wchar_t string functions, as are
38 * prescribed by ISO-C, but which MSVC also expects, (in contravention of
39 * ISO-C prescriptions), to find in <string.h>. To accommodate this MSVC
40 * anomaly, we make provision for <string.h> to include a selected subset
41 * of <wchar.h>; thus, we do not immediately define _WCHAR_T...
43 #ifndef __STRING_H_SOURCED__
44 /* ...but defer it until we have confirmed that this is NOT inclusion for
45 * only this subset of <wchar.h> declarations.
49 /* All MinGW headers are required to include <_mingw.h>; in the case of
50 * selective inclusion by <string.h>, we expect it to have already done
51 * so, but since that doesn't apply here, we must do it ourselves.
55 #ifndef __STRICT_ANSI__
56 /* MSDN says that isw* char classifications appear in both <wchar.h>,
57 * and in <wctype.h>. Although these <wctype.h> classifications are as
58 * prescribed by ISO-C, their exposure in <wchar.h> is not; nonetheless,
59 * we replicate them here, for MSDN conformity.
63 /* This is also necessary, to support the non-ANSI wchar.h declarations
64 * which MSDN identifies as being provided here.
66 # include <sys/types.h>
68 #endif /* !__STRICT_ANSI__ */
71 #define WCHAR_MAX 0xffff
73 #define WEOF (wchar_t)(0xffff)
76 #define __WCHAR_H_SOURCED__
77 /* ISO-C, POSIX, and Microsoft specify an overlap of content between
78 * <wchar.h> and other system header files; by inclusion of such other
79 * headers within this "__WCHAR_H_SOURCED__" scope, we may selectively
80 * retrieve the overlapping content, without requiring duplication of
81 * that content here; thus, from...
84 /* ...we obtain (possibly indirect) definitions and declarations for:
86 * macros NULL, FILENAME_MAX
87 * types size_t, wchar_t, wint_t, va_list (a.k.a. __VALIST), FILE
88 * types ssize_t, off_t, __off64_t, (conditionally, as needed)
90 * int fwprintf (FILE *, const wchar_t *, ...);
91 * int wprintf (const wchar_t *, ...);
92 * int vfwprintf (FILE *, const wchar_t *, __VALIST);
93 * int vwprintf (const wchar_t *, __VALIST);
94 * int snwprintf (wchar_t *, size_t, const wchar_t *, ...);
95 * int _snwprintf (wchar_t *, size_t, const wchar_t *, ...);
96 * int _vscwprintf (const wchar_t *, __VALIST);
97 * int _vsnwprintf (wchar_t *, size_t, const wchar_t *, __VALIST);
98 * int vsnwprintf (wchar_t *, size_t, const wchar_t *, __VALIST);
99 * int fwscanf (FILE *, const wchar_t *, ...);
100 * int wscanf (const wchar_t *, ...);
101 * int swscanf (const wchar_t *, const wchar_t *, ...);
102 * int vwscanf (const wchar_t *, __VALIST);
103 * int vfwscanf (FILE *, const wchar_t *, __VALIST);
104 * int vswscanf (const wchar_t *, const wchar_t *, __VALIST);
105 * wint_t fgetwc (FILE *);
106 * wint_t fputwc (wchar_t, FILE *);
107 * wint_t ungetwc (wchar_t, FILE *);
109 * The following pair of Microsoft functions conflict with their
110 * corresponding ISO-C prototypes; consequently they will not be
111 * declared when "__STRICT_ANSI__" checking is in effect:
113 * int swprintf (wchar_t *, const wchar_t *, ...);
114 * int vswprintf (wchar_t *, const wchar_t *, __VALIST);
116 * The following group of functions is specified by ISO-C, but
117 * their Microsoft implementations are available only if use of
118 * "__MSVCRT__" is specified:
120 * wchar_t * fgetws (wchar_t *, int, FILE *);
121 * int fputws (const wchar_t *, FILE *);
122 * wint_t getwc (FILE *);
123 * wint_t getwchar (void);
124 * wint_t putwc (wint_t, FILE *);
125 * wint_t putwchar (wint_t);
127 * The following group of functions is also dependent on use of
128 * "__MSVCRT__"; however, these are Microsoft specific, so they
129 * are not declared if "__STRICT_ANSI__" checking is specified:
131 * wchar_t * _getws (wchar_t *);
132 * int _putws (const wchar_t *);
133 * FILE * _wfdopen (int, const wchar_t *);
134 * FILE * _wfopen (const wchar_t *, const wchar_t *);
135 * FILE * _wfreopen (const wchar_t *, const wchar_t *, FILE *);
136 * FILE * _wfsopen (const wchar_t *, const wchar_t *, int);
137 * wchar_t * _wtmpnam (wchar_t *);
138 * wchar_t * _wtempnam (const wchar_t *, const wchar_t *);
139 * int _wrename (const wchar_t *, const wchar_t *);
140 * int _wremove (const wchar_t *);
141 * void _wperror (const wchar_t *);
142 * FILE * _wpopen (const wchar_t *, const wchar_t *);
145 * In similar fashion, from...
148 /* ...we obtain prototypes for universally supported functions:
150 * long wcstol (const wchar_t *, wchar_t **, int);
151 * unsigned long wcstoul (const wchar_t *, wchar_t **, int);
152 * double wcstod (const wchar_t *, wchar_t **);
154 * The following are Microsoft specific, and require MSCVRT.DLL,
155 * or any of its non-free derivatives; they are not available to
156 * applications which use CRTDLL.DLL:
158 * wchar_t *_wgetenv (const wchar_t *);
159 * int _wputenv (const wchar_t *);
160 * void _wsearchenv (const wchar_t *, const wchar_t *, wchar_t *);
161 * int _wsystem (const wchar_t *);
162 * void _wmakepath (wchar_t *, const wchar_t *, const wchar_t *,
163 * const wchar_t *, const wchar_t *
165 * void _wsplitpath (const wchar_t *, wchar_t *, wchar_t *,
166 * wchar_t *, wchar_t *
168 * wchar_t *_wfullpath (wchar_t *, const wchar_t *, size_t);
170 * ...with this pair requiring either WinXP (or later), or one of
171 * the non-free MSVC runtimes from MSVCR70.DLL onwards:
173 * __int64 _wcstoi64 (const wchar_t *, wchar_t **, int);
174 * unsigned __int64 _wcstoui64 (const wchar_t *, wchar_t **, int);
176 * ...and this pair requiring Win-Vista (or later), or a non-free
177 * MSVC runtime from MSVCR80.DLL onwards:
179 * __int64 _wcstoi64_l (const wchar_t *, wchar_t **, int, _locale_t);
180 * unsigned __int64 _wcstoui64_l (const wchar_t *, wchar_t **,
184 * ...while this pair are ISO-C99 standards, which are available
185 * in libmingwex.a, but not in any version of MSVCRT.DLL, (nor in
186 * any of its non-free derivatives prior to MSVCR120.DLL), nor in
189 * float wcstof (const wchar_t *restrict, wchar_t **restrict);
190 * long double wcstold (const wchar_t *restrict, wchar_t **restrict);
195 #ifndef __STRICT_ANSI__
196 /* ...when NOT compiling with "__STRICT_ANSI__" conformity checking,
200 /* ...we obtain prototypes for each of the following functions,
201 * (none of which are available when using CRTDLL.DLL):
203 * int _wchdir (const wchar_t *);
204 * wchar_t *_wgetcwd (wchar_t *, int);
205 * wchar_t *_wgetdcwd (int, wchar_t *, int);
206 * int _wmkdir (const wchar_t *);
207 * int _wrmdir (const wchar_t *);
212 #include "sys/stat.h"
213 /* ...we obtain function prototypes, and all associated data type
214 * definitions for this pair of actual functions, in all versions of
215 * MSVCRT.DLL, and its non-free derivatives preceding MSVCR80.DLL, (or
216 * inline replacement implementations for MSVCR80.DLL and later):
218 * int _wstat (const wchar_t *, struct _stat *);
219 * int _wstati64 (const wchar_t *, struct _stati64 *);
221 * ...this additional actual function, available in MSVCRT.DLL from
222 * Win2K onwards, or in non-free MSVCR61.DLL and again requiring an
223 * inline replacement from MSVCR80.DLL onwards:
225 * int _wstat64 (const wchar_t *, struct __stat64 *);
227 * ...and these actual functions, which are available only in non-free
228 * MSVCR80.DLL, and its later derivatives:
230 * int _wstat32 (const wchar_t *, struct __stat32 *);
231 * int _wstat32i64 (const wchar_t *, struct _stat32i64 *);
232 * int _wstat64i32 (const wchar_t *, struct _stat64i32 *);
238 /* ...we obtain function prototypes for each of the following, which
239 * are available in all versions of MSVCRT.DLL, (and all its non-free
240 * derivatives), but are not supported by CRTDLL.DLL:
242 * int _waccess (const wchar_t *, int);
243 * int _wchmod (const wchar_t *, int);
244 * int _wcreat (const wchar_t *, int);
245 * int _wopen (const wchar_t *, int, ...);
246 * int _wsopen (const wchar_t *, int, int, ...);
247 * int _wunlink (const wchar_t *);
248 * wchar_t *_wmktemp (wchar_t *);
250 * ...and also function prototypes and definitions of all associated
251 * data types and manifest constants for the following, each of which
252 * is physically implemented in all versions of MSVCRT.DLL, and in each
253 * of its non-free variants prior to MSVCR80.DLL, or emulated by inline
254 * replacement functions for MSVCR80.DLL and later:
256 * intptr_t _wfindfirst (wchar_t *, struct _wfinddata_t *);
257 * int _wfindnext (intptr_t, struct _wfinddata_t *);
259 * intptr_t _wfindfirsti64 (wchar_t *, struct _wfinddatai64_t *);
260 * int _wfindnexti64 (intptr_t, struct _wfinddatai64_t *);
262 * ...this additional pair of functions, available in all versions of
263 * MSVCRT.DLL from Win2K, and non-free variants from MSVCR61.DLL:
265 * intptr_t _wfindfirst64 (wchar_t *, struct __wfinddata64_t *);
266 * int _wfindnext64 (intptr_t, struct __wfinddata64_t *);
268 * ...and these, which are only available in the non-free run-times
269 * from MSVCR80.DLL onwards:
271 * intptr_t _wfindfirst32 (wchar_t *, struct _wfinddata32_t *);
272 * int _wfindnext32 (intptr_t, struct _wfinddata32_t *);
274 * intptr_t _wfindfirst32i64 (wchar_t *, struct _wfinddata32i64_t *);
275 * int _wfindnext32i64 (intptr_t, struct _wfinddata32i64_t *);
277 * intptr_t _wfindfirst64i32 (wchar_t *, struct _wfinddata64i32_t *);
278 * int _wfindnext64i32 (intptr_t, struct _wfinddata64i32_t *);
280 * Additionally, although Microsoft's <wchar.h> may not declare it,
281 * this is required to complement all variants of the _wfindfirst()
282 * and _wfindnext() API, so we also declare the prototype for:
284 * int _findclose (intptr_t);
286 #endif /* !__STRICT_ANSI__ */
291 /* ...we always obtain an opaque forward declaration of:
295 * ...and prototype declarations for the following ISO-C99 function,
296 * (which is always provided):
298 * size_t wcsftime (wchar_t *, size_t, const wchar_t *, const struct tm *);
300 * ...together with the following non-ISO-C functions, (which are
301 * NOT exposed when "__STRICT_ANSI__" checking is enabled):
303 * wchar_t *_wctime (const time_t *);
304 * wchar_t *_wasctime (const struct tm *);
305 * wchar_t *_wstrdate (wchar_t *);
306 * wchar_t *_wstrtime (wchar_t *);
308 * Of the preceding group, we also note that, while it remains in
309 * all versions of MSVCRT.DLL, (using a strictly 32-bit data type
310 * to represent its "time_t" argument), the _wctime() function is
311 * NOT present in MSVCR80.DLL, and later versions of the non-free
312 * MSVC runtime libraries, in which it is replaced by either of:
314 * wchar_t *_wctime64 (const __time64_t *);
315 * wchar_t *_wctime32 (const __time32_t *);
317 * ...with the actual replacement being chosen at compile time, on
318 * the basis of the user specified "_USE_32BIT_TIME_T" feature test
319 * macro, (a Microsoft specific, brain damaged concept), which maps
320 * _wctime() itself, as an in-line alias for its corresponding
321 * replacement library function.
324 #ifndef __STRICT_ANSI__
325 /* Once again, when NOT compiling with "__STRICT_ANSI__" conformity
329 /* ...we obtain the declaration for:
331 * wchar_t *_wsetlocale (int, const wchar_t *);
337 /* ...we obtain function prototypes for:
339 * intptr_t _wexecl (const wchar_t *, const wchar_t *, ...);
340 * intptr_t _wexecle (const wchar_t *, const wchar_t *, ...);
341 * intptr_t _wexeclp (const wchar_t *, const wchar_t *, ...);
342 * intptr_t _wexeclpe (const wchar_t *, const wchar_t *, ...);
344 * intptr_t _wexecv (const wchar_t *, const wchar_t * const *);
345 * intptr_t _wexecve (
346 * const wchar_t *, const wchar_t * const *, const wchar_t * const *
348 * intptr_t _wexecvp (const wchar_t *, const wchar_t * const *);
349 * intptr_t _wexecvpe (
350 * const wchar_t *, const wchar_t * const *, const wchar_t * const *
353 * intptr_t _wspawnl (int, const wchar_t *, const wchar_t *, ...);
354 * intptr_t _wspawnle (int, const wchar_t *, const wchar_t *, ...);
355 * intptr_t _wspawnlp (int, const wchar_t *, const wchar_t *, ...);
356 * intptr_t _wspawnlpe (int, const wchar_t *, const wchar_t *, ...);
358 * intptr_t _wspawnv (int, const wchar_t *, const wchar_t * const *);
359 * intptr_t _wspawnve (
360 * int, const wchar_t *, const wchar_t * const *, const wchar_t * const *
362 * intptr_t _wspawnvp (int, const wchar_t *, const wchar_t * const *);
363 * intptr_t _wspawnvpe (
364 * int, const wchar_t *, const wchar_t * const *, const wchar_t * const *
368 #endif /* !__STRICT_ANSI__ */
372 /* Wide character string functions must be specified here, as required
373 * by the ISO-C Standard; however, MSVC contravenes this standard by also
374 * requiring them to appear in <string.h>. We declare them here, where
375 * they rightfully belong, but we also arrange for them to be available
376 * for selective inclusion by <string.h>; to facilitate this, we must
377 * change the declarative condition...
379 #endif /* ! RC_INVOKED */
380 #endif /* !__STRING_H_SOURCED__ */
381 #if ! defined RC_INVOKED
382 #if !(defined _WCHAR_H && (defined _STRING_H && ! defined __STRICT_ANSI__))
383 /* ...such that these declarations are exposed when either _WCHAR_H is defined,
384 * or when _STRING_H is defined and __STRICT_ANSI__ is not, but NOT when BOTH of
385 * these apply, since that indicates that this group of declarations has already
386 * been processed, during partial inclusion of <wchar.h> by <string.h>, whereas
387 * we are now including <wchar.h> in its own right.
390 * Wide character versions of the ISO-C standard string functions.
392 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcscat (wchar_t *, const wchar_t *);
393 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcschr (const wchar_t *, wchar_t);
394 _CRTIMP __cdecl __MINGW_NOTHROW int wcscmp (const wchar_t *, const wchar_t *);
395 _CRTIMP __cdecl __MINGW_NOTHROW int wcscoll (const wchar_t *, const wchar_t *);
396 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcscpy (wchar_t *, const wchar_t *);
397 _CRTIMP __cdecl __MINGW_NOTHROW size_t wcscspn (const wchar_t *, const wchar_t *);
398 _CRTIMP __cdecl __MINGW_NOTHROW size_t wcslen (const wchar_t *);
399 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsncat (wchar_t *, const wchar_t *, size_t);
400 _CRTIMP __cdecl __MINGW_NOTHROW int wcsncmp (const wchar_t *, const wchar_t *, size_t);
401 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsncpy (wchar_t *, const wchar_t *, size_t);
402 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcspbrk (const wchar_t *, const wchar_t *);
403 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsrchr (const wchar_t *, wchar_t);
404 _CRTIMP __cdecl __MINGW_NOTHROW size_t wcsspn (const wchar_t *, const wchar_t *);
405 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsstr (const wchar_t *, const wchar_t *);
406 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcstok (wchar_t *, const wchar_t *);
407 _CRTIMP __cdecl __MINGW_NOTHROW size_t wcsxfrm (wchar_t *, const wchar_t *, size_t);
409 #ifndef __STRICT_ANSI__
410 /* UTF-16LE versions of non-ANSI string functions provided by CRTDLL.DLL
412 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_wcsdup (const wchar_t *);
413 _CRTIMP __cdecl __MINGW_NOTHROW int _wcsicmp (const wchar_t *, const wchar_t *);
414 _CRTIMP __cdecl __MINGW_NOTHROW int _wcsicoll (const wchar_t *, const wchar_t *);
415 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_wcslwr (wchar_t*);
416 _CRTIMP __cdecl __MINGW_NOTHROW int _wcsnicmp (const wchar_t *, const wchar_t *, size_t);
417 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_wcsnset (wchar_t *, wchar_t, size_t);
418 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_wcsrev (wchar_t *);
419 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_wcsset (wchar_t *, wchar_t);
420 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_wcsupr (wchar_t *);
423 _CRTIMP __cdecl __MINGW_NOTHROW int _wcsncoll (const wchar_t *, const wchar_t *, size_t);
424 _CRTIMP __cdecl __MINGW_NOTHROW int _wcsnicoll (const wchar_t *, const wchar_t *, size_t);
426 /* A wide character counterpart to the strerror() API was introduced in
427 * MSVCR70.DLL, and subsequently back-ported to MSVCRT.DLL in WinXP.
429 #if __MSVCRT_VERSION__ >= __MSVCR70_DLL || NTDDI_VERSION >= NTDDI_WINXP
431 * These are are the wide character counterparts to the strerror()
432 * function itself, and the _strerror() function, respectively.
434 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_wcserror (int);
435 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *__wcserror (const wchar_t *);
437 #endif /* MSVCR70.DLL || WinXP */
438 #endif /* __MSVCRT__ */
440 /* MSVCRT.DLL provides neither _wcscmpi() nor wcscmpi(); the heritage
441 * is uncertain, but for the convenience, (and portability), of legacy
442 * applications which assume wcscmpi() should be available:
444 #define _wcscmpi _wcsicmp
445 int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t *, const wchar_t *);
447 #ifndef __NO_INLINE__
448 __CRT_ALIAS __JMPSTUB__(( FUNCTION = wcscmpi, REMAPPED = _wcsicmp ))
449 int wcscmpi (const wchar_t *__ws1, const wchar_t *__ws2)
450 { return _wcsicmp (__ws1, __ws2); }
451 #endif /* __NO_INLINE__ */
454 /* Older CRTDLL.DLL versions may have provided these alternatively named
455 * functions; we continue to support them, via the OLDNAME libraries:
457 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsdup (const wchar_t *);
458 _CRTIMP __cdecl __MINGW_NOTHROW int wcsicmp (const wchar_t *, const wchar_t *);
459 _CRTIMP __cdecl __MINGW_NOTHROW int wcsicoll (const wchar_t *, const wchar_t *);
460 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcslwr (wchar_t *);
461 _CRTIMP __cdecl __MINGW_NOTHROW int wcsnicmp (const wchar_t *, const wchar_t *, size_t);
462 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsnset (wchar_t *, wchar_t, size_t);
463 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsrev (wchar_t *);
464 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsset (wchar_t *, wchar_t);
465 _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsupr (wchar_t *);
467 #endif /* !_NO_OLDNAMES */
468 #endif /* !__STRICT_ANSI__ */
470 /* This completes the set of declarations which are to be duplicated by
471 * inclusion of <string.h>; revert the declarative condition, to make it
472 * specific to <wchar.h> alone.
474 #endif /* !(_WCHAR_H && (_STRING_H && !__STRICT_ANSI__)) */
475 #endif /* ! RC_INVOKED */
477 #if defined _WCHAR_H && ! defined RC_INVOKED
478 #ifndef __STRICT_ANSI__
479 typedef wchar_t _Wint_t;
482 typedef int mbstate_t;
484 /* The following multi-byte character conversion functions are
485 * implemented in libmingwex.a, (and maybe also in some non-free
486 * Microsoft libraries, such as MSVCP60.DLL and later).
488 __cdecl __MINGW_NOTHROW wint_t btowc (int);
489 __cdecl __MINGW_NOTHROW int wctob (wint_t);
491 __cdecl __MINGW_NOTHROW
492 size_t mbrlen (const char *__restrict__, size_t, mbstate_t *__restrict__);
494 __cdecl __MINGW_NOTHROW size_t mbrtowc
495 (wchar_t *__restrict__, const char *__restrict__, size_t, mbstate_t *__restrict__);
497 __cdecl __MINGW_NOTHROW size_t mbsrtowcs
498 (wchar_t *__restrict__, const char **__restrict__, size_t, mbstate_t *__restrict__);
500 __cdecl __MINGW_NOTHROW
501 size_t wcrtomb (char * __restrict__, wchar_t, mbstate_t *__restrict__);
503 __cdecl __MINGW_NOTHROW size_t wcsrtombs
504 (char *__restrict__, const wchar_t **__restrict__, size_t, mbstate_t *__restrict__);
506 #if defined _ISOC99_SOURCE || defined __cplusplus
507 /* These ISO-C99 functions are implemented in libmingwex.a,
508 * or, in some cases, as inline stubs; while provided as MinGW
509 * extensions to support ISO-C99, they are also required by
512 __cdecl __MINGW_NOTHROW int fwide (FILE *, int);
513 __cdecl __MINGW_NOTHROW int mbsinit (const mbstate_t *);
515 #ifndef __NO_INLINE__
516 __CRT_INLINE __cdecl __MINGW_NOTHROW
517 int fwide (FILE *__UNUSED_PARAM(stream), int mode)
518 { return mode; } /* Nothing to do */
520 __CRT_INLINE __cdecl __MINGW_NOTHROW
521 int mbsinit (const mbstate_t *__UNUSED_PARAM(ps))
525 __cdecl __MINGW_NOTHROW wchar_t *wmemset (wchar_t *, wchar_t, size_t);
526 __cdecl __MINGW_NOTHROW wchar_t *wmemchr (const wchar_t *, wchar_t, size_t);
528 /* FIXME: what makes this so different from every other function
529 * in this group? Why is it not qualified with the __cdecl, and
530 * __MINGW_NOTHROW attributes?
532 int wmemcmp (const wchar_t *, const wchar_t *, size_t);
534 __cdecl __MINGW_NOTHROW
535 wchar_t *wmemcpy (wchar_t *__restrict__, const wchar_t *__restrict__, size_t);
537 __cdecl __MINGW_NOTHROW wchar_t *wmemmove (wchar_t *, const wchar_t *, size_t);
539 __cdecl __MINGW_NOTHROW
540 long long wcstoll (const wchar_t *__restrict__, wchar_t **__restrict__, int);
542 __cdecl __MINGW_NOTHROW unsigned long long wcstoull
543 (const wchar_t *__restrict__, wchar_t **__restrict__, int);
544 #endif /* _ISOC99_SOURCE */
548 #undef __WCHAR_H_SOURCED__
549 #endif /* _WCHAR_H && ! RC_INVOKED */
550 #endif /* !_WCHAR_H: $RCSfile$: end of file */