Mercurial > hg > CbC > CbC_llvm
diff libcxx/include/wchar.h @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 |
parents | 79ff65ed7e25 |
children | 1f2b6ac9f198 |
line wrap: on
line diff
--- a/libcxx/include/wchar.h Wed Jul 21 10:27:27 2021 +0900 +++ b/libcxx/include/wchar.h Wed Nov 09 17:45:10 2022 +0900 @@ -1,5 +1,5 @@ // -*- C++ -*- -//===--------------------------- wchar.h ----------------------------------===// +//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -10,7 +10,7 @@ #if defined(__need_wint_t) || defined(__need_mbstate_t) #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header +# pragma GCC system_header #endif #include_next <wchar.h> @@ -108,8 +108,12 @@ #include <__config> #include <stddef.h> +#if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) +# error "The <wchar.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled" +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header +# pragma GCC system_header #endif #ifdef __cplusplus @@ -170,13 +174,13 @@ } #endif -#if defined(__cplusplus) && defined(_LIBCPP_MSVCRT_LIKE) +#if defined(__cplusplus) && (defined(_LIBCPP_MSVCRT_LIKE) || defined(__MVS__)) extern "C" { -size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src, - size_t nmc, size_t len, mbstate_t *__restrict ps); -size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src, - size_t nwc, size_t len, mbstate_t *__restrict ps); -} // extern "C++" -#endif // __cplusplus && _LIBCPP_MSVCRT +size_t mbsnrtowcs(wchar_t *__restrict __dst, const char **__restrict __src, + size_t __nmc, size_t __len, mbstate_t *__restrict __ps); +size_t wcsnrtombs(char *__restrict __dst, const wchar_t **__restrict __src, + size_t __nwc, size_t __len, mbstate_t *__restrict __ps); +} // extern "C" +#endif // __cplusplus && (_LIBCPP_MSVCRT || __MVS__) #endif // _LIBCPP_WCHAR_H