Skip to content

[libcxx] Define _LIBCPP_HAS_C8RTOMB_MBRTOC8 for picolibc #152724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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