schannel: Work around typo in macro from classic MinGW include#7580
Closed
jay wants to merge 1 commit intocurl:masterfrom
Closed
schannel: Work around typo in macro from classic MinGW include#7580jay wants to merge 1 commit intocurl:masterfrom
jay wants to merge 1 commit intocurl:masterfrom
Conversation
bagder
reviewed
Aug 17, 2021
5940b7e to
1aece8b
Compare
MarcelRaad
reviewed
Aug 17, 2021
lib/vtls/schannel.c
Outdated
Member
There was a problem hiding this comment.
I don't understand. What was the build error? The preprocessor condition here was meant to avoid build errors. Or was the problem the lack of this CIPHEROPTION? Then this preprocessor condition should be deleted.
Member
Author
There was a problem hiding this comment.
It's the same build error as described in the bug. The current fix in schannel does not work here because __W32API_MAJOR_VERSION is undefined. It is defined in w32api.h but that is not included by any other mingw include. I could get it working with:
#ifdef __MINGW32__
#include <w32api.h>
#endif
However rather than do that to fix the version check the latest iteration of my patch removes it and compensates for the typo instead.
- Define ALG_CLASS_DHASH (the typo from the include) to ALG_CLASS_HASH. Prior to this change there was an incomplete fix to ignore the CALG_TLS1PRF macro on those versions of MinGW where it uses the ALG_CLASS_DHASH typoed macro. Ref: 48cf45c Ref: https://osdn.net/projects/mingw/ticket/38391 Ref: curl#2924 Closes #xxxx
1aece8b to
daf41dd
Compare
MarcelRaad
approved these changes
Aug 19, 2021
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.
Prior to this change the build error was noted but it was expected the
user would update to the latest classic MinGW headers to fix it.
Ref: https://osdn.net/projects/mingw/ticket/38391
Ref: #2924
Closes #xxxx
/cc @MarcelRaad