On Dec 29, 2014 10:27 AM, "Richard Gorton" < rcgorton@cognitive-electronics.com> wrote: > > > Hi, > > I'm working on getting C++ working for our target: we use clang, and libcxx/libcxxabi libraries from llvm.org > it seems to me (as I'm doing this) that instead of doing things like > > // Our compiler defines __COGNITIVE__ > #if defined(__COGNITIVE__) > > It would make more sense to use > > #if defined(__MUSL__) > > > I'm not proposing/suggesting use of this within musl itself, but for use in other libraries (such as libcxx) which 'know' about the internal implementation of libc. > Thoughts & Comments appreciated > > > > An example case is in libcxx/src/locale.cpp, where there are bits of code related to accessing the current locale: > I suspect the thing to do here is more to iterate over the set of chars and construct the table as needed: there's no sensible interface to this bit of functionality in a standard way (and musl to my knowledge doesn't have the table you want exposed anywhere). Note that doing it that way ought to just work anywhere.