Skip to content

Conversation

eleftherioszisis
Copy link
Collaborator

@eleftherioszisis eleftherioszisis commented Jun 21, 2025

Do not use GNU locale extensions (e.g. strtol_l) if not supported (e.g. musl based linux distros)

musl has locale_t to meet POSIX requirements, but omits strtol_l() and similar functions because they are non-standard GNU extensions

  • Added a small program in CMake/CompilerFlags.cmake that sets HAS_LOCALE_EXTENSIONS if it compiles
  • Preprocessor uses it in src/readers/utils.[h|cpp] to toggle the usage of locale-specific functions.

@eleftherioszisis eleftherioszisis changed the title Do not use GNU locale extensions (e.g. strtol_l) when not supported (e.g. musl based linux distros) Do not use GNU locale extensions when not supported Jun 21, 2025
@coveralls
Copy link

coveralls commented Jun 21, 2025

Pull Request Test Coverage Report for Build 15800030097

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 77.247%

Totals Coverage Status
Change from base Build 15735173935: 0.0%
Covered Lines: 2217
Relevant Lines: 2870

💛 - Coveralls

@eleftherioszisis eleftherioszisis changed the title Do not use GNU locale extensions when not supported Do not use GNU locale extensions if not supported Jun 21, 2025
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