build: streamline non-UWP wincrypt detections#11657
Closed
vszakats wants to merge 5 commits intocurl:masterfrom
Closed
build: streamline non-UWP wincrypt detections#11657vszakats wants to merge 5 commits intocurl:masterfrom
vszakats wants to merge 5 commits intocurl:masterfrom
Conversation
MarcelRaad
approved these changes
Aug 11, 2023
It was used only as a prerequisite for checking for `CryptAcquireContext()` in wincrypt lib. The latter check fails anyway if the header is missing.
It was a requirement for wincrypt.h. After deleting that check, we need to move this requirement to the crypto API check directly.
Found the problem: it's MSYS2 env-related. Interestingly the win32 crypto check passes on MSYS2, even though it #includes windows.h. While the pure windows.h check fails. Had to restore the windows.h prereq for the crypto check to fix this.
d3b3d35 to
15fff06
Compare
ptitSeb
pushed a commit
to wasix-org/curl
that referenced
this pull request
Sep 25, 2023
- with CMake, use the variable `WINDOWS_STORE` to detect an UWP build and disable our non-UWP-compatible use the Windows crypto API. This allows to drop two dynamic feature checks. `WINDOWS_STORE` is true when invoking CMake with `CMAKE_SYSTEM_NAME` == `WindowsStore`. Introduced in CMake v3.1. Ref: https://cmake.org/cmake/help/latest/variable/WINDOWS_STORE.html - with autotools, drop the separate feature check for `wincrypt.h`. On one hand this header has been present for long (even Borland C 5.5 had it from year 2000), on the other we used the check result solely to enable another check for certain crypto functions. This fails anyway with the header not present. We save one dynamic feature check at the configure stage. Reviewed-by: Marcel Raad Closes curl#11657
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
with CMake, use the variable
WINDOWS_STOREto detect an UWP buildand disable our non-UWP-compatible use the Windows crypto API. This
allows to drop two dynamic feature checks.
WINDOWS_STOREis true when invoking CMake withCMAKE_SYSTEM_NAME==WindowsStore. Introduced in CMake v3.1.Ref: https://cmake.org/cmake/help/latest/variable/WINDOWS_STORE.html
with autotools, drop the separate feature check for
wincrypt.h. Onone hand this header has been present for long (even Borland C 5.5 had
it from year 2000), on the other we used the check result solely to
enable another check for certain crypto functions. This fails anyway
with the header not present. We save one dynamic feature check at the
configure stage.
Closes #11657