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

[pull] master from curl:master #288

Merged
merged 3 commits into from
Jan 18, 2025
Merged

[pull] master from curl:master #288

merged 3 commits into from
Jan 18, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 18, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Replace `strtok_r()` detection with detection mingw-w64 version.
The use this version to pre-fill `HAVE_STRTOK_R`.

This gives use mingw-w64 version information for free.

Closes #16022
On Windows a successful `sched_yield()` detection requires mingw-w64
built with POSIX threads (not Win32 threads) and GCC (not llvm/clang).
(linking to `winpthread` via custom options may also work.)

In CMake builds, it was pre-cached as unavailable before this patch.

When detected (via autotools), it got only used for Windows XP or older
targets combined with a non-GCC, non-clang compiler that doesn't support
`__builtin_ia32_pause()`, or with the Intel C compiler. According to
`lib/easy_lock.h`.

mingw-w64 only supports GCC and clang, leaving a very narrow chance when
`shed_yield()` gets called on Windows. Even then, `sched_yield()` is
implemented in `winpthread` as `Sleep(0)`, which may or not be a useful.
It's also trivial to implement locally if it is, and such rare build
combination is also deemed useful.

Thus, this patch marks `sched_yields()` permanently unavailable on the
Windows platform also with autotools, and instead of pre-caching, skip
this feature check with CMake.

This syncs `HAVE_SCHED_YIELDS` between builds methods on Windows.

Follow-up to 9b517c8 #11973
Follow-up to 23af112 #8680

Closes #16037
@pull pull bot added the ⤵️ pull label Jan 18, 2025
@pull pull bot merged commit 38e7302 into AraHaan:master Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant