Skip to content
8 changes: 6 additions & 2 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,12 @@ typedef __char32_t char32_t;
# else
# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 0
# endif
# else
# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 0
# elif defined(_LIBCPP_PICOLIBC_PREREQ)
# if _LIBCPP_PICOLIBC_PREREQ(1, 8, 9) && defined(__cpp_char8_t)
# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 1
# else
# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 0
# endif
# endif

// There are a handful of public standard library types that are intended to
Expand Down
4 changes: 4 additions & 0 deletions libcxx/include/__configuration/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
// user code. Move code paths that need _NEWLIB_VERSION to another customization mechanism.
#if __has_include(<picolibc.h>)
# include <picolibc.h>
# define _LIBCPP_PICOLIBC_VERSION_INT(maj, min, patch) (maj * 10000 + min * 100 + patch)
# define _LIBCPP_PICOLIBC_PREREQ(maj, min, patch) \
_LIBCPP_PICOLIBC_VERSION_INT(__PICOLIBC__, __PICOLIBC_MINOR__, __PICOLIBC_PATCHLEVEL__) >= \
_LIBCPP_PICOLIBC_VERSION_INT(maj, min, patch)
#endif

#ifndef __BYTE_ORDER__
Expand Down
Loading