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

build: drop unused feature-detection code for Apple poll() #14718

Closed

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Aug 29, 2024

Drop Apple-specific detection logic for poll(). This detection snippet
has been disabled for Apple in both configure and cmake, for poll()
being broken on Apple since 10.12 Sierra (2016).

Also replace exit(1); with return 1; in configure, to make the
snippets match.

Added in 9297ca4 #1057 (2016-10-11).

Disabled for:
configure/darwin in a34c7ce (2016-10-18)
cmake/macOS in 825911b #7619
cmake/iOS in d148312 #8244
cmake/all Apple in a86254b #12515

Drop Apple-specific detection logic for `poll()`. This detection snippet
has been disabled for Apple in both configure and cmake, for `poll()`
being broken on Apple since 10.12 Sierra (2016).

Also replace `exit(1);` with `return 1;` in configure, to make the
snippets match.
@vszakats vszakats added build tidy-up appleOS specific to an Apple operating system labels Aug 29, 2024
@vszakats vszakats marked this pull request as draft August 29, 2024 08:24
@vszakats vszakats changed the title build: drop unused feature-detection code [WIP] build: drop unused feature-detection code Aug 29, 2024
@vszakats vszakats changed the title [WIP] build: drop unused feature-detection code build: drop unused feature-detection code Aug 29, 2024
@vszakats vszakats changed the title build: drop unused feature-detection code build: drop unused feature-detection code for Apple poll() Aug 29, 2024
@vszakats vszakats marked this pull request as ready for review August 29, 2024 08:30
@vszakats vszakats closed this in cc8b813 Aug 29, 2024
@vszakats vszakats deleted the build-del-unused-det-code-apple branch August 29, 2024 15:56
vszakats added a commit to vszakats/curl that referenced this pull request Aug 29, 2024
Also:
- cmake: delete unnecessary `#include <sys/time.h>` from
  non-cross-build `poll()` detection snippet.
  Follow-up tp cc8b813 curl#14718

Fixes curl#14714
vszakats added a commit that referenced this pull request Aug 30, 2024
For cross-builds rely on `_POSIX_C_SOURCE` to decide if `poll()` is
supported, rather than just assuming it isn't.

This may still miss to detect `poll()` support, as seen for example with
Linux MUSL cross-builds.

Also:

- GHA/curl-for-win: enable RISC-V 64 cross-target for Linux MUSL.
  (to test this case with cmake, with a false-negative.)
  The first RISC-V 64 build in curl's CI.

- GHA/curl-for-win: add arm64/intel64 job for Linux glibc.
  (to test this case with cmake, and succeed.)

- cmake: delete unnecessary `#include <sys/time.h>` from non-cross-build
  `poll()` detection snippet.
  Follow-up tp cc8b813 #14718

Fixes #14714
Closes #14734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appleOS specific to an Apple operating system build tidy-up
Development

Successfully merging this pull request may close these issues.

2 participants