Skip to content
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

Don't include xlocale.h on Linux without glibc #1165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hannesbraun
Copy link

@hannesbraun hannesbraun commented Dec 7, 2024

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).

@tobil4sk
Copy link
Member

tobil4sk commented Jan 22, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants