Most of the #ifdefs in the locale code would check for the existence of
GLIBC or for operating systems other than Linux. This patch considers the
case where GLIBC isn't available on Linux, and allows the libcxx
library to build successfully when using the musl C library (with a
small patch for the extended locale functions strtoll_l() and
strtoull_l()).
Details
Details
- Reviewers
mclow.lists
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I don't think it's correct to say that !defined(__GLIBC__) && defined(__linux__) ==> Musl (nor is the converse true). Unfortunately, Musl intentionally doesn't provide that sort of macro [1], so to provide support for Musl in libc++, we need to make note of it at configure-time via something like a _LIBCXX_LIBC_IS_MUSL macro via D13407.
Comment Actions
Agreed. That would be much more elegant. I had to write another patch to test for the existence of *each* extended locale functions during configuration-time. It was generic but an ugly hack. Offering a _LIBCXX_LIBC_IS_MUSL option/macro would make things quite simpler. I'll abandon this review request and I'll wait until D13407 is committed.