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

cmake: pre-cache HAVE_BASENAME for mingw-w64 and MSVC #11974

Closed
wants to merge 1 commit into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Sep 28, 2023

basename is present in mingw-w64, missing from MSVC. Pre-cache accordingly to make configure faster.

Notice that basename has a bug so we later disable it even with mingw-w64:

curl/lib/curl_setup.h

Lines 820 to 825 in 781242f

/* Certain Windows implementations are not aligned with what curl expects,
so always use the local one on this platform. E.g. the mingw-w64
implementation can return wrong results for non-ASCII inputs. */
#if defined(HAVE_BASENAME) && defined(WIN32)
#undef HAVE_BASENAME
#endif

Closes #11974

`basename` is present in mingw-w64, missing from MSVC. Pre-cache
accordingly to make configure faster.

Notice that `basename` has Unicode bugs so we later disable its use
even with mingw-w64:
https://github.com/curl/curl/blob/781242ffa44a9f9b95b6da5ac5a1bf6372ec6257/lib/curl_setup.h#L820-L825

Closes curl#11974
@vszakats vszakats added cmake Windows Windows-specific labels Sep 28, 2023
@github-actions github-actions bot added the build label Sep 28, 2023
@vszakats vszakats closed this in 14b7456 Sep 28, 2023
@vszakats vszakats deleted the cmake-win-cache-more branch September 28, 2023 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant