[libc++] Workaround the absence of the __GLIBC_USE macro in glibc versions prior to 2.25.
This change correct a configuration check that relies on the glibc __GLIBC_USE macro being defined. Previously, the function-like macro was expanded without ensuring it was actually defined. This resulted in compilation failures for glibc versions prior to 2.25 (the glibc version in which the macro was added). Differential Revision: https://reviews.llvm.org/D130946
This commit is contained in:
parent
af91e2b9db
commit
946849f6d0
|
@ -1218,7 +1218,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
|
|||
// determining the latter depends on internal GNU libc details. If the
|
||||
// __cpp_char8_t feature test macro is not defined, then a char8_t typedef
|
||||
// will be declared as well.
|
||||
# if defined(_LIBCPP_GLIBC_PREREQ)
|
||||
# if defined(_LIBCPP_GLIBC_PREREQ) && defined(__GLIBC_USE)
|
||||
# if _LIBCPP_GLIBC_PREREQ(2, 36) && (defined(__cpp_char8_t) || __GLIBC_USE(ISOC2X))
|
||||
# undef _LIBCPP_HAS_NO_C8RTOMB_MBRTOC8
|
||||
# endif
|
||||
|
|
Loading…
Reference in New Issue