brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 01e1d57 Raw
61 lines · c
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-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP_UCHAR_H11#define _LIBCPP_UCHAR_H12 13/*14    uchar.h synopsis // since C++1115 16Macros:17 18    __STDC_UTF_16__19    __STDC_UTF_32__20 21Types:22 23  mbstate_t24  size_t25 26size_t mbrtoc8(char8_t* pc8, const char* s, size_t n, mbstate_t* ps);     // since C++2027size_t c8rtomb(char* s, char8_t c8, mbstate_t* ps);                       // since C++2028size_t mbrtoc16(char16_t* pc16, const char* s, size_t n, mbstate_t* ps);29size_t c16rtomb(char* s, char16_t c16, mbstate_t* ps);30size_t mbrtoc32(char32_t* pc32, const char* s, size_t n, mbstate_t* ps);31size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps);32 33*/34 35#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)36#  include <__cxx03/uchar.h>37#else38#  include <__config>39 40#  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)41#    pragma GCC system_header42#  endif43 44#  if !defined(_LIBCPP_CXX03_LANG)45 46// Some platforms don't implement <uchar.h> and we don't want to give a hard47// error on those platforms. When the platform doesn't provide <uchar.h>, at48// least include <stddef.h> so we get the declaration for size_t, and try to49// get the declaration of mbstate_t too.50#    if __has_include_next(<uchar.h>)51#      include_next <uchar.h>52#    else53#      include <__mbstate_t.h>54#      include <stddef.h>55#    endif56 57#  endif // _LIBCPP_CXX03_LANG58#endif   // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)59 60#endif // _LIBCPP_UCHAR_H61