Skip to content

schannel: Work around typo in macro from classic MinGW include#7580

Closed
jay wants to merge 1 commit intocurl:masterfrom
jay:fix_classic_mingw_build_error
Closed

schannel: Work around typo in macro from classic MinGW include#7580
jay wants to merge 1 commit intocurl:masterfrom
jay:fix_classic_mingw_build_error

Conversation

@jay
Copy link
Member

@jay jay commented Aug 17, 2021

  • Define ALG_CLASS_DHASH (the typo from the include) to ALG_CLASS_HASH.

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

@jay jay added the build label Aug 17, 2021
@jay jay force-pushed the fix_classic_mingw_build_error branch from 5940b7e to 1aece8b Compare August 17, 2021 07:39
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

@jay jay Aug 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@jay jay force-pushed the fix_classic_mingw_build_error branch from 1aece8b to daf41dd Compare August 17, 2021 20:23
@jay jay closed this in 7d76be3 Aug 21, 2021
@jay jay deleted the fix_classic_mingw_build_error branch August 21, 2021 07:10
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.

3 participants