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: detect HAVE_GETADDRINFO_THREADSAFE #11979

Closed

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Sep 29, 2023

Based on existing autotools logic.

autotools checks for old versions of the allowlisted target OSes and
disables this feature when seeing them. In CMake we assume we're running
on newer systems and enable regardless of OS version.

autotools always runs all 3 probes for non-fast-tracked systems and
enables this feature if any one of them was successful. To save
configuration time, CMake stops at the first successful check.

OpenBSD is not fast-tracked and then gets blocklisted as a generic BSD
system. I haven't double-checked if this is correct, but looks odd.

Ref: #11964 (effort to sync cmake detections with autotools)

Closes #11979


I might have misread or overlooked autotools logic. Please review.

Based on autotools logic.

Ref: curl#11964

Closes #xxxxx
@vszakats vszakats force-pushed the cmake-HAVE_GETADDRINFO_THREADSAFE branch from d4e6f45 to cc794fc Compare September 29, 2023 02:13
@vszakats vszakats closed this in 04a3a37 Sep 29, 2023
@vszakats vszakats deleted the cmake-HAVE_GETADDRINFO_THREADSAFE branch September 29, 2023 18:34
vszakats added a commit to vszakats/curl that referenced this pull request Oct 11, 2023
Skip `check_c_source_runs()` call when cross-building.

Regression from 04a3a37 curl#11979

Reported-by: Kartatz on Github
Fixes curl#12093
Closes #xxxxx
vszakats added a commit that referenced this pull request Oct 12, 2023
Fix `HAVE_H_ERRNO_ASSIGNABLE` to not run, only compile its test snippet,
aligning this with autotools. This fixes an error when doing
cross-builds and also actually detects this feature. It affected systems
not allowlisted into this, e.g. SerenityOS.

We used this detection result to enable `HAVE_GETADDRINFO_THREADSAFE`.

Follow-up to 04a3a37 #11979
Ref: #12095 (closed in favour of this patch)
Ref: #11964 (effort to sync cmake detections with autotools)

Reported-by: Kartatz on Github
Assisted-by: Kartatz on Github
Fixes #12093
Closes #12094
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants