29 @PRAGMA_SYSTEM_HEADER@
33 #if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
46 #@INCLUDE_NEXT@ @NEXT_WCHAR_H@
51 #ifndef _@GUARD_PREFIX@_WCHAR_H
53 #define _GL_ALREADY_INCLUDING_WCHAR_H
56 # include <features.h>
66 #if !(defined __GLIBC__ && !defined __UCLIBC__)
78 # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
81 #undef _GL_ALREADY_INCLUDING_WCHAR_H
83 #ifndef _@GUARD_PREFIX@_WCHAR_H
84 #define _@GUARD_PREFIX@_WCHAR_H
88 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
89 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
91 # define _GL_ATTRIBUTE_PURE
102 #if !@HAVE_WINT_T@ && !defined wint_t
111 # if defined _MSC_VER
112 # if !GNULIB_defined_wint_t
113 # include <crtdefs.h>
114 typedef unsigned int rpl_wint_t;
116 # define wint_t rpl_wint_t
117 # define GNULIB_defined_wint_t 1
121 # define WEOF ((wint_t) -1)
129 #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
130 # if !GNULIB_defined_mbstate_t
133 # define mbstate_t rpl_mbstate_t
134 # define GNULIB_defined_mbstate_t 1
142 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
144 # define btowc rpl_btowc
155 #elif defined GNULIB_POSIXCHECK
157 # if HAVE_RAW_DECL_BTOWC
159 "use gnulib module btowc for portability");
167 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
169 # define wctob rpl_wctob
174 # if !defined wctob && !@HAVE_DECL_WCTOB@
181 #elif defined GNULIB_POSIXCHECK
183 # if HAVE_RAW_DECL_WCTOB
185 "use gnulib module wctob for portability");
192 # if @REPLACE_MBSINIT@
193 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
195 # define mbsinit rpl_mbsinit
206 #elif defined GNULIB_POSIXCHECK
208 # if HAVE_RAW_DECL_MBSINIT
210 "use gnulib module mbsinit for portability");
217 # if @REPLACE_MBRTOWC@
218 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
220 # define mbrtowc rpl_mbrtowc
223 (
wchar_t *pwc,
const char *s,
size_t n,
mbstate_t *ps));
225 (
wchar_t *pwc,
const char *s,
size_t n,
mbstate_t *ps));
229 (
wchar_t *pwc,
const char *s,
size_t n,
mbstate_t *ps));
232 (
wchar_t *pwc,
const char *s,
size_t n,
mbstate_t *ps));
235 #elif defined GNULIB_POSIXCHECK
237 # if HAVE_RAW_DECL_MBRTOWC
239 "use gnulib module mbrtowc for portability");
246 # if @REPLACE_MBRLEN@
247 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
249 # define mbrlen rpl_mbrlen
260 #elif defined GNULIB_POSIXCHECK
262 # if HAVE_RAW_DECL_MBRLEN
264 "use gnulib module mbrlen for portability");
270 #if @GNULIB_MBSRTOWCS@
271 # if @REPLACE_MBSRTOWCS@
272 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
274 # define mbsrtowcs rpl_mbsrtowcs
277 (
wchar_t *dest,
const char **srcp,
size_t len,
mbstate_t *ps)
280 (
wchar_t *dest,
const char **srcp,
size_t len,
283 # if !@HAVE_MBSRTOWCS@
285 (
wchar_t *dest,
const char **srcp,
size_t len,
mbstate_t *ps)
289 (
wchar_t *dest,
const char **srcp,
size_t len,
293 #elif defined GNULIB_POSIXCHECK
295 # if HAVE_RAW_DECL_MBSRTOWCS
297 "use gnulib module mbsrtowcs for portability");
303 #if @GNULIB_MBSNRTOWCS@
304 # if @REPLACE_MBSNRTOWCS@
305 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
307 # define mbsnrtowcs rpl_mbsnrtowcs
310 (
wchar_t *dest,
const char **srcp,
size_t srclen,
size_t len,
314 (
wchar_t *dest,
const char **srcp,
size_t srclen,
size_t len,
317 # if !@HAVE_MBSNRTOWCS@
319 (
wchar_t *dest,
const char **srcp,
size_t srclen,
size_t len,
324 (
wchar_t *dest,
const char **srcp,
size_t srclen,
size_t len,
328 #elif defined GNULIB_POSIXCHECK
330 # if HAVE_RAW_DECL_MBSNRTOWCS
332 "use gnulib module mbsnrtowcs for portability");
339 # if @REPLACE_WCRTOMB@
340 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
342 # define wcrtomb rpl_wcrtomb
353 #elif defined GNULIB_POSIXCHECK
355 # if HAVE_RAW_DECL_WCRTOMB
357 "use gnulib module wcrtomb for portability");
363 #if @GNULIB_WCSRTOMBS@
364 # if @REPLACE_WCSRTOMBS@
365 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
367 # define wcsrtombs rpl_wcsrtombs
370 (
char *dest,
const wchar_t **srcp,
size_t len,
mbstate_t *ps)
373 (
char *dest,
const wchar_t **srcp,
size_t len,
376 # if !@HAVE_WCSRTOMBS@
378 (
char *dest,
const wchar_t **srcp,
size_t len,
mbstate_t *ps)
382 (
char *dest,
const wchar_t **srcp,
size_t len,
386 #elif defined GNULIB_POSIXCHECK
388 # if HAVE_RAW_DECL_WCSRTOMBS
390 "use gnulib module wcsrtombs for portability");
396 #if @GNULIB_WCSNRTOMBS@
397 # if @REPLACE_WCSNRTOMBS@
398 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
400 # define wcsnrtombs rpl_wcsnrtombs
403 (
char *dest,
const wchar_t **srcp,
size_t srclen,
size_t len,
407 (
char *dest,
const wchar_t **srcp,
size_t srclen,
size_t len,
410 # if !@HAVE_WCSNRTOMBS@
412 (
char *dest,
const wchar_t **srcp,
size_t srclen,
size_t len,
417 (
char *dest,
const wchar_t **srcp,
size_t srclen,
size_t len,
421 #elif defined GNULIB_POSIXCHECK
423 # if HAVE_RAW_DECL_WCSNRTOMBS
425 "use gnulib module wcsnrtombs for portability");
432 # if @REPLACE_WCWIDTH@
433 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
435 # define wcwidth rpl_wcwidth
440 # if !@HAVE_DECL_WCWIDTH@
447 #elif defined GNULIB_POSIXCHECK
449 # if HAVE_RAW_DECL_WCWIDTH
451 "use gnulib module wcwidth for portability");
459 _GL_FUNCDECL_SYS (wmemchr,
wchar_t *, (
const wchar_t *s,
wchar_t c,
size_t n)
468 wchar_t *, (
const wchar_t *,
wchar_t,
size_t),
469 const wchar_t *, (
const wchar_t *,
wchar_t,
size_t));
470 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
471 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
474 (
const wchar_t *s,
wchar_t c,
size_t n));
478 #elif defined GNULIB_POSIXCHECK
480 # if HAVE_RAW_DECL_WMEMCHR
482 "use gnulib module wmemchr for portability");
491 (
const wchar_t *
s1,
const wchar_t *s2,
size_t n)
495 (
const wchar_t *
s1,
const wchar_t *s2,
size_t n));
497 #elif defined GNULIB_POSIXCHECK
499 # if HAVE_RAW_DECL_WMEMCMP
501 "use gnulib module wmemcmp for portability");
510 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
513 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
515 #elif defined GNULIB_POSIXCHECK
517 # if HAVE_RAW_DECL_WMEMCPY
519 "use gnulib module wmemcpy for portability");
526 #if @GNULIB_WMEMMOVE@
527 # if !@HAVE_WMEMMOVE@
529 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
532 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
534 #elif defined GNULIB_POSIXCHECK
536 # if HAVE_RAW_DECL_WMEMMOVE
538 "use gnulib module wmemmove for portability");
550 #elif defined GNULIB_POSIXCHECK
552 # if HAVE_RAW_DECL_WMEMSET
554 "use gnulib module wmemset for portability");
566 #elif defined GNULIB_POSIXCHECK
568 # if HAVE_RAW_DECL_WCSLEN
570 "use gnulib module wcslen for portability");
583 #elif defined GNULIB_POSIXCHECK
585 # if HAVE_RAW_DECL_WCSNLEN
587 "use gnulib module wcsnlen for portability");
599 #elif defined GNULIB_POSIXCHECK
601 # if HAVE_RAW_DECL_WCSCPY
603 "use gnulib module wcscpy for portability");
615 #elif defined GNULIB_POSIXCHECK
617 # if HAVE_RAW_DECL_WCPCPY
619 "use gnulib module wcpcpy for portability");
628 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
631 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
633 #elif defined GNULIB_POSIXCHECK
635 # if HAVE_RAW_DECL_WCSNCPY
637 "use gnulib module wcsncpy for portability");
647 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
650 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
652 #elif defined GNULIB_POSIXCHECK
654 # if HAVE_RAW_DECL_WCPNCPY
656 "use gnulib module wcpncpy for portability");
668 #elif defined GNULIB_POSIXCHECK
670 # if HAVE_RAW_DECL_WCSCAT
672 "use gnulib module wcscat for portability");
681 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
684 (
wchar_t *dest,
const wchar_t *
src,
size_t n));
686 #elif defined GNULIB_POSIXCHECK
688 # if HAVE_RAW_DECL_WCSNCAT
690 "use gnulib module wcsncat for portability");
703 #elif defined GNULIB_POSIXCHECK
705 # if HAVE_RAW_DECL_WCSCMP
707 "use gnulib module wcscmp for portability");
716 (
const wchar_t *
s1,
const wchar_t *s2,
size_t n)
720 (
const wchar_t *
s1,
const wchar_t *s2,
size_t n));
722 #elif defined GNULIB_POSIXCHECK
724 # if HAVE_RAW_DECL_WCSNCMP
726 "use gnulib module wcsncmp for portability");
732 #if @GNULIB_WCSCASECMP@
733 # if !@HAVE_WCSCASECMP@
739 #elif defined GNULIB_POSIXCHECK
741 # if HAVE_RAW_DECL_WCSCASECMP
743 "use gnulib module wcscasecmp for portability");
749 #if @GNULIB_WCSNCASECMP@
750 # if !@HAVE_WCSNCASECMP@
752 (
const wchar_t *
s1,
const wchar_t *s2,
size_t n)
756 (
const wchar_t *
s1,
const wchar_t *s2,
size_t n));
758 #elif defined GNULIB_POSIXCHECK
760 # if HAVE_RAW_DECL_WCSNCASECMP
762 "use gnulib module wcsncasecmp for portability");
775 #elif defined GNULIB_POSIXCHECK
777 # if HAVE_RAW_DECL_WCSCOLL
779 "use gnulib module wcscoll for portability");
793 #elif defined GNULIB_POSIXCHECK
795 # if HAVE_RAW_DECL_WCSXFRM
797 "use gnulib module wcsxfrm for portability");
809 #elif defined GNULIB_POSIXCHECK
811 # if HAVE_RAW_DECL_WCSDUP
813 "use gnulib module wcsdup for portability");
830 wchar_t *, (
const wchar_t *,
wchar_t),
831 const wchar_t *, (
const wchar_t *,
wchar_t));
832 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
833 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
839 #elif defined GNULIB_POSIXCHECK
841 # if HAVE_RAW_DECL_WCSCHR
843 "use gnulib module wcschr for portability");
860 wchar_t *, (
const wchar_t *,
wchar_t),
861 const wchar_t *, (
const wchar_t *,
wchar_t));
862 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
863 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
869 #elif defined GNULIB_POSIXCHECK
871 # if HAVE_RAW_DECL_WCSRCHR
873 "use gnulib module wcsrchr for portability");
882 _GL_FUNCDECL_SYS (wcscspn,
size_t, (
const wchar_t *wcs,
const wchar_t *reject)
885 _GL_CXXALIAS_SYS (wcscspn,
size_t, (
const wchar_t *wcs,
const wchar_t *reject));
887 #elif defined GNULIB_POSIXCHECK
889 # if HAVE_RAW_DECL_WCSCSPN
891 "use gnulib module wcscspn for portability");
900 _GL_FUNCDECL_SYS (wcsspn,
size_t, (
const wchar_t *wcs,
const wchar_t *accept)
903 _GL_CXXALIAS_SYS (wcsspn,
size_t, (
const wchar_t *wcs,
const wchar_t *accept));
905 #elif defined GNULIB_POSIXCHECK
907 # if HAVE_RAW_DECL_WCSSPN
909 "use gnulib module wcsspn for portability");
918 (
const wchar_t *wcs,
const wchar_t *accept)
927 wchar_t *, (
const wchar_t *,
const wchar_t *),
928 const wchar_t *, (
const wchar_t *,
const wchar_t *));
929 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
930 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
932 (
wchar_t *wcs,
const wchar_t *accept));
934 (
const wchar_t *wcs,
const wchar_t *accept));
938 #elif defined GNULIB_POSIXCHECK
940 # if HAVE_RAW_DECL_WCSPBRK
942 "use gnulib module wcspbrk for portability");
951 (
const wchar_t *haystack,
const wchar_t *needle)
960 wchar_t *, (
const wchar_t *,
const wchar_t *),
961 const wchar_t *, (
const wchar_t *,
const wchar_t *));
962 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
963 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
965 (
wchar_t *haystack,
const wchar_t *needle));
967 (
const wchar_t *haystack,
const wchar_t *needle));
971 #elif defined GNULIB_POSIXCHECK
973 # if HAVE_RAW_DECL_WCSSTR
975 "use gnulib module wcsstr for portability");
984 (
wchar_t *wcs,
const wchar_t *delim,
wchar_t **ptr));
987 (
wchar_t *wcs,
const wchar_t *delim,
wchar_t **ptr));
989 #elif defined GNULIB_POSIXCHECK
991 # if HAVE_RAW_DECL_WCSTOK
993 "use gnulib module wcstok for portability");
1000 #if @GNULIB_WCSWIDTH@
1001 # if @REPLACE_WCSWIDTH@
1002 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1004 # define wcswidth rpl_wcswidth
1010 # if !@HAVE_WCSWIDTH@
1017 #elif defined GNULIB_POSIXCHECK
1019 # if HAVE_RAW_DECL_WCSWIDTH
1021 "use gnulib module wcswidth for portability");
static int wc
FI: Provisional management of warnings.
#define src(name, suf)
HPFC by Fabien Coelho, May 1993 and later...
#define _GL_ARG_NONNULL(params)
A C macro for declaring that specific arguments must not be NULL.
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
_GL_CXXALIAS_RPL (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that...
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
_GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); declares a replacement function,...
#define _GL_CXXALIAS_SYS_CAST2(func, rettype, parameters, rettype2, parameters2)
_GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); is like _GL_CXXALIAS_SYS (...
#define _GL_CXXALIASWARN(func)
_GL_CXXALIASWARN (func); causes a warning to be emitted when ::func is used but not when GNULIB_NAMES...
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
_GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that...
#define _GL_CXXALIASWARN1(func, rettype, parameters_and_attributes)
_GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); causes a warning to be emitted when the...
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
_GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); declares the system function,...
#define _GL_WARN_ON_USE(function, message)
A C macro for emitting warnings if a function is used.
#define wint_t
The definitions of _GL_FUNCDECL_RPL etc.
int rpl_mbstate_t
Override mbstate_t if it is too small.
#define _GL_ATTRIBUTE_PURE
The attribute feature is available in gcc versions 2.5 and later.