HAVE_LOCALE_T is misnamed, as it must only be defined not just when locale_t type is available but when the functions using it, such as strxxx_l(), are available.
Due to the confusion about the nature of this symbol, CMake didn't check for it correctly and only checked for its existence, but musl (used by e.g. Alpine) does define the type without providing any of the functions using it, which resulted in build errors later.
Fix this by checking for both the type and the functions in CMake too, just as we do in configure.
Closes #25749.
https://github.com/wxWidgets/wxWidgets/pull/25750
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@MaartenBent commented on this pull request.
> endif() - check_type_size(locale_t LOCALE_T) + wx_check_c_source_compiles(" + locale_t t; + strtod_l(NULL, NULL, t); + strtol_l(NULL, NULL, 0, t); + strtoul_l(NULL, NULL, 0, t); +" + HAVE_LOCALE_T + ${xlocale_headers} + ) set(CMAKE_EXTRA_INCLUDE_FILES)
You can get rid of this line too. CMAKE_EXTRA_INCLUDE_FILES
is not used anymore so no need to reset it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@vadz commented on this pull request.
> endif() - check_type_size(locale_t LOCALE_T) + wx_check_c_source_compiles(" + locale_t t; + strtod_l(NULL, NULL, t); + strtol_l(NULL, NULL, 0, t); + strtoul_l(NULL, NULL, 0, t); +" + HAVE_LOCALE_T + ${xlocale_headers} + ) set(CMAKE_EXTRA_INCLUDE_FILES)
Sorry, I planned to do it but somehow forgot. I'll do it when merging (if you don't have any further comments).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@MaartenBent commented on this pull request.
> endif() - check_type_size(locale_t LOCALE_T) + wx_check_c_source_compiles(" + locale_t t; + strtod_l(NULL, NULL, t); + strtol_l(NULL, NULL, 0, t); + strtoul_l(NULL, NULL, 0, t); +" + HAVE_LOCALE_T + ${xlocale_headers} + ) set(CMAKE_EXTRA_INCLUDE_FILES)
No other comments. CMake builds / Ubuntu 22.04
still passes the test, so looks good to me.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Closed #25750.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Merged in the commit above.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.