11 #if defined(__need_wint_t) || defined(__need_mbstate_t)
13 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
14 #pragma GCC system_header
17 #include_next <wchar.h>
19 #elif !defined(_LIBCPP_WCHAR_H)
20 #define _LIBCPP_WCHAR_H
111 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
112 #pragma GCC system_header
116 #define __CORRECT_ISO_CPP_WCHAR_H_PROTO
119 #include_next <wchar.h>
122 #if defined(_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
123 # define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
124 #elif defined(__GLIBC_PREREQ)
125 # if __GLIBC_PREREQ(2, 10)
126 # define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
128 #elif defined(_LIBCPP_MSVCRT)
129 # if defined(_CRT_CONST_CORRECT_OVERLOADS)
130 # define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
134 #if defined(__cplusplus) && !defined(_LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
136 inline _LIBCPP_INLINE_VISIBILITY
137 wchar_t* __libcpp_wcschr(
const wchar_t* __s,
wchar_t __c) {
return (
wchar_t*)wcschr(__s, __c);}
138 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
139 const wchar_t* wcschr(
const wchar_t* __s,
wchar_t __c) {
return __libcpp_wcschr(__s, __c);}
140 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
141 wchar_t* wcschr(
wchar_t* __s,
wchar_t __c) {
return __libcpp_wcschr(__s, __c);}
143 inline _LIBCPP_INLINE_VISIBILITY
144 wchar_t* __libcpp_wcspbrk(
const wchar_t* __s1,
const wchar_t* __s2) {
return (
wchar_t*)wcspbrk(__s1, __s2);}
145 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
146 const wchar_t* wcspbrk(
const wchar_t* __s1,
const wchar_t* __s2) {
return __libcpp_wcspbrk(__s1, __s2);}
147 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
148 wchar_t* wcspbrk(
wchar_t* __s1,
const wchar_t* __s2) {
return __libcpp_wcspbrk(__s1, __s2);}
150 inline _LIBCPP_INLINE_VISIBILITY
151 wchar_t* __libcpp_wcsrchr(
const wchar_t* __s,
wchar_t __c) {
return (
wchar_t*)wcsrchr(__s, __c);}
152 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
153 const wchar_t* wcsrchr(
const wchar_t* __s,
wchar_t __c) {
return __libcpp_wcsrchr(__s, __c);}
154 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
155 wchar_t* wcsrchr(
wchar_t* __s,
wchar_t __c) {
return __libcpp_wcsrchr(__s, __c);}
157 inline _LIBCPP_INLINE_VISIBILITY
158 wchar_t* __libcpp_wcsstr(
const wchar_t* __s1,
const wchar_t* __s2) {
return (
wchar_t*)wcsstr(__s1, __s2);}
159 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
160 const wchar_t* wcsstr(
const wchar_t* __s1,
const wchar_t* __s2) {
return __libcpp_wcsstr(__s1, __s2);}
161 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
162 wchar_t* wcsstr(
wchar_t* __s1,
const wchar_t* __s2) {
return __libcpp_wcsstr(__s1, __s2);}
164 inline _LIBCPP_INLINE_VISIBILITY
165 wchar_t* __libcpp_wmemchr(
const wchar_t* __s,
wchar_t __c,
size_t __n) {
return (
wchar_t*)wmemchr(__s, __c, __n);}
166 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
167 const wchar_t* wmemchr(
const wchar_t* __s,
wchar_t __c,
size_t __n) {
return __libcpp_wmemchr(__s, __c, __n);}
168 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
169 wchar_t* wmemchr(
wchar_t* __s,
wchar_t __c,
size_t __n) {
return __libcpp_wmemchr(__s, __c, __n);}
173 #if defined(__cplusplus) && defined(_LIBCPP_MSVCRT_LIKE)
175 size_t mbsnrtowcs(
wchar_t *__restrict dst,
const char **__restrict src,
176 size_t nmc,
size_t len, mbstate_t *__restrict ps);
177 size_t wcsnrtombs(
char *__restrict dst,
const wchar_t **__restrict src,
178 size_t nwc,
size_t len, mbstate_t *__restrict ps);
180 #endif // __cplusplus && _LIBCPP_MSVCRT
182 #endif // _LIBCPP_WCHAR_H