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: sync HAVE_SIGNAL detection with autotools #9725

Closed
wants to merge 1 commit into from

Conversation

vszakats
Copy link
Member

HAVE_SIGNAL means the availability of the signal() function in autotools, while in CMake it meant the availability of that function and the symbol SIGALRM.

The latter is not available on Windows, but the function is, which means on Windows, autotools did define HAVE_SIGNAL, but CMake did not, introducing a slight difference into the binaries.

This patch syncs CMake behaviour with autotools to look for the function only.

The logic came with the initial commit adding CMake support to curl, so the commit history doesn't reveal the reason behind it. In any case, it's best to check the existence of SIGALRM directly in the source before use. For now, curl builds fine with HAVE_SIGNAL enabled and SIGALRM missing.

Follow-up to 68fa9bf

Closes #xxxx

@vszakats vszakats added the cmake label Oct 13, 2022
`HAVE_SIGNAL` means the availability of the `signal()` function in
autotools, while in CMake it meant the availability of that function
_and_ the symbol `SIGALRM`.

The latter is not available on Windows, but the function is, which means
on Windows, autotools did define `HAVE_SIGNAL`, but CMake did not,
introducing a slight difference into the binaries.

This patch syncs CMake behaviour with autotools to look for the function
only.

The logic came with the initial commit adding CMake support to curl, so
the commit history doesn't reveal the reason behind it. In any case,
it's best to check the existence of `SIGALRM` directly in the source
before use. For now, curl builds fine with `HAVE_SIGNAL` enabled and
`SIGALRM` missing.

Follow-up to 68fa9bf

Closes #xxxx
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

1 participant