hxcpp icon indicating copy to clipboard operation
hxcpp copied to clipboard

Don't include xlocale.h on Linux without glibc

Open hannesbraun opened this issue 1 year ago • 1 comments

For glibc based systems, xlocale.h is already excluded. On Linux distributions with musl libc (for example Alpine Linux), xlocale.h is unavailable as well. As there is no macro to detect musl, my suggested fix would be to rely on __linux__ and assume that xlocale.h is not required on Linux systems in general. I left the check for __GLIBC__ there in case __linux__ is not available (for whatever reason).

hannesbraun avatar Dec 07 '24 17:12 hannesbraun

These were the patch notes when xlocale.h was removed: https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27

We know that a number of programs do include it, but because it has never been part of any other C library, programs that use it are probably testing for its existence with autoconf or a similar tool, and should not fail to compile.

~~Are there any systems were this might still be used? Perhaps this should just be removed?~~ EDIT: Looks like it's still required by mac 13 and older

tobil4sk avatar Jan 22 '25 22:01 tobil4sk