uchar.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_UCHAR_H
  10. #define _LIBCPP_UCHAR_H
  11. /*
  12. uchar.h synopsis // since C++11
  13. Macros:
  14. __STDC_UTF_16__
  15. __STDC_UTF_32__
  16. Types:
  17. mbstate_t
  18. size_t
  19. size_t mbrtoc16(char16_t* pc16, const char* s, size_t n, mbstate_t* ps);
  20. size_t c16rtomb(char* s, char16_t c16, mbstate_t* ps);
  21. size_t mbrtoc32(char32_t* pc32, const char* s, size_t n, mbstate_t* ps);
  22. size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps);
  23. */
  24. #include <__config>
  25. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  26. # pragma GCC system_header
  27. #endif
  28. #if !defined(_LIBCPP_CXX03_LANG)
  29. // Some platforms don't implement <uchar.h> and we don't want to give a hard
  30. // error on those platforms. When the platform doesn't provide <uchar.h>, at
  31. // least include <stddef.h> so we get the declaration for size_t.
  32. #if __has_include_next(<uchar.h>)
  33. # include_next <uchar.h>
  34. #else
  35. # include <stddef.h>
  36. #endif
  37. #endif // _LIBCPP_CXX03_LANG
  38. #endif // _LIBCPP_UCHAR_H