File indexing completed on 2026-05-03 08:13:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #if defined(__need_wint_t) || defined(__need_mbstate_t)
0011
0012 # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0013 # pragma GCC system_header
0014 # endif
0015
0016 # include_next <wchar.h>
0017
0018 #elif !defined(_LIBCPP___CXX03_WCHAR_H)
0019 # define _LIBCPP___CXX03_WCHAR_H
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108 # include <__cxx03/__config>
0109 # include <__cxx03/stddef.h>
0110
0111 # if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
0112 # error \
0113 "The <wchar.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled"
0114 # endif
0115
0116 # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0117 # pragma GCC system_header
0118 # endif
0119
0120
0121
0122 # ifdef __cplusplus
0123 # define __CORRECT_ISO_CPP_WCHAR_H_PROTO
0124 # endif
0125
0126 # if __has_include_next(<wchar.h>)
0127 # include_next <wchar.h>
0128 # else
0129 # include <__cxx03/__mbstate_t.h> // make sure we have mbstate_t regardless of the existence of <wchar.h>
0130 # endif
0131
0132
0133 # if defined(_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
0134 # define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
0135 # elif defined(__GLIBC_PREREQ)
0136 # if __GLIBC_PREREQ(2, 10)
0137 # define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
0138 # endif
0139 # elif defined(_LIBCPP_MSVCRT)
0140 # if defined(_CRT_CONST_CORRECT_OVERLOADS)
0141 # define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
0142 # endif
0143 # endif
0144
0145 # if defined(__cplusplus) && !defined(_LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
0146 extern "C++" {
0147 inline _LIBCPP_HIDE_FROM_ABI wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {
0148 return (wchar_t*)wcschr(__s, __c);
0149 }
0150 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {
0151 return __libcpp_wcschr(__s, __c);
0152 }
0153 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD wchar_t* wcschr(wchar_t* __s, wchar_t __c) {
0154 return __libcpp_wcschr(__s, __c);
0155 }
0156
0157 inline _LIBCPP_HIDE_FROM_ABI wchar_t* __libcpp_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {
0158 return (wchar_t*)wcspbrk(__s1, __s2);
0159 }
0160 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const wchar_t*
0161 wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {
0162 return __libcpp_wcspbrk(__s1, __s2);
0163 }
0164 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD wchar_t* wcspbrk(wchar_t* __s1, const wchar_t* __s2) {
0165 return __libcpp_wcspbrk(__s1, __s2);
0166 }
0167
0168 inline _LIBCPP_HIDE_FROM_ABI wchar_t* __libcpp_wcsrchr(const wchar_t* __s, wchar_t __c) {
0169 return (wchar_t*)wcsrchr(__s, __c);
0170 }
0171 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const wchar_t* wcsrchr(const wchar_t* __s, wchar_t __c) {
0172 return __libcpp_wcsrchr(__s, __c);
0173 }
0174 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD wchar_t* wcsrchr(wchar_t* __s, wchar_t __c) {
0175 return __libcpp_wcsrchr(__s, __c);
0176 }
0177
0178 inline _LIBCPP_HIDE_FROM_ABI wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {
0179 return (wchar_t*)wcsstr(__s1, __s2);
0180 }
0181 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const wchar_t*
0182 wcsstr(const wchar_t* __s1, const wchar_t* __s2) {
0183 return __libcpp_wcsstr(__s1, __s2);
0184 }
0185 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD wchar_t* wcsstr(wchar_t* __s1, const wchar_t* __s2) {
0186 return __libcpp_wcsstr(__s1, __s2);
0187 }
0188
0189 inline _LIBCPP_HIDE_FROM_ABI wchar_t* __libcpp_wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {
0190 return (wchar_t*)wmemchr(__s, __c, __n);
0191 }
0192 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const wchar_t*
0193 wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {
0194 return __libcpp_wmemchr(__s, __c, __n);
0195 }
0196 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD wchar_t* wmemchr(wchar_t* __s, wchar_t __c, size_t __n) {
0197 return __libcpp_wmemchr(__s, __c, __n);
0198 }
0199 }
0200 # endif
0201
0202 # if defined(__cplusplus) && (defined(_LIBCPP_MSVCRT_LIKE) || defined(__MVS__))
0203 extern "C" {
0204 size_t mbsnrtowcs(
0205 wchar_t* __restrict __dst, const char** __restrict __src, size_t __nmc, size_t __len, mbstate_t* __restrict __ps);
0206 size_t wcsnrtombs(
0207 char* __restrict __dst, const wchar_t** __restrict __src, size_t __nwc, size_t __len, mbstate_t* __restrict __ps);
0208 }
0209 # endif
0210
0211 #endif