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
Fix MinGW build #2721
Fix MinGW build #2721
Conversation
When size_t is not a typedef for unsigned long (as usually the case on Windows), GCC emits -Wformat warnings when using lu and lx format specifiers with size_t. Silence them with explicit casts to unsigned long.
Otherwise, only part of it gets pulled in through <windows.h> on original MinGW. Fixes curl#2361
They are not defined in the original MinGW's <wincrypt.h>.
Original MinGW's w32api has CryptHashData's second parameter as BYTE * instead of const BYTE *.
MinGW warns: /lib/vtls/schannel.c:219:64: warning: signed and unsigned type in conditional expression [-Wsign-compare] Fix this by casting the ptrdiff_t to size_t as we know it's positive.
They are not defined in the original MinGW's <wincrypt.h>. Closes curl#2721
Original MinGW's w32api has CryptHashData's second parameter as BYTE * instead of const BYTE *. Closes curl#2721
MinGW warns: /lib/vtls/schannel.c:219:64: warning: signed and unsigned type in conditional expression [-Wsign-compare] Fix this by casting the ptrdiff_t to size_t as we know it's positive. Closes curl#2721
@MarcelRaad, should there have been one more algo #ifdef'ed? See this mingw build failure from the push. |
@bagder That's apparently a typo in MinGW's Windows SDK, w32api. I have patched this locally in w32api as We could #ifdef on original MinGW, but then users cannot just fix their w32api. But fixing the autobuilds is probably more important? I've created a ticket here: https://osdn.net/projects/mingw/ticket/38391 |
Yeah, I consider that fairly important and getting mingw fixed and deployed sounds like a potentially rather slow operation... What about doing a local "kludge" with a comment explaining the reasoning and a date for when we can try to remove it again? |
Original MinGW's w32api has a sytax error in its definition of CALG_TLS1PRF [0]. Don't use original MinGW w32api's CALG_TLS1PRF until this bug [1] is fixed. [0] https://osdn.net/projects/mingw/scm/git/mingw-org-wsl/blobs/d1d4a17e51a2b78e252ef0147d483267d56c90cc/w32api/include/wincrypt.h [1] https://osdn.net/projects/mingw/ticket/38391 Fixes curl#2721 (comment) Closes
Original MinGW's w32api has a sytax error in its definition of CALG_TLS1PRF [0]. Don't use original MinGW w32api's CALG_TLS1PRF until this bug [1] is fixed. [0] https://osdn.net/projects/mingw/scm/git/mingw-org-wsl/blobs/d1d4a17e51a2b78e252ef0147d483267d56c90cc/w32api/include/wincrypt.h [1] https://osdn.net/projects/mingw/ticket/38391 Fixes curl#2721 (comment) Closes curl#2728
Strange, it works for me, but the autobuild still fails: @mback2k Could you tell me what this tester's w32api.h says about the version macros, please? Are |
When size_t is not a typedef for unsigned long (as usually the case on Windows), GCC emits -Wformat warnings when using lu and lx format specifiers with size_t. Silence them with explicit casts to unsigned long. Closes curl#2721
They are not defined in the original MinGW's <wincrypt.h>. Closes curl#2721
Original MinGW's w32api has CryptHashData's second parameter as BYTE * instead of const BYTE *. Closes curl#2721
MinGW warns: /lib/vtls/schannel.c:219:64: warning: signed and unsigned type in conditional expression [-Wsign-compare] Fix this by casting the ptrdiff_t to size_t as we know it's positive. Closes curl#2721
Original MinGW's w32api has a sytax error in its definition of CALG_TLS1PRF [0]. Don't use original MinGW w32api's CALG_TLS1PRF until this bug [1] is fixed. [0] https://osdn.net/projects/mingw/scm/git/mingw-org-wsl/blobs/d1d4a17e51a2b78e252ef0147d483267d56c90cc/w32api/include/wincrypt.h [1] https://osdn.net/projects/mingw/ticket/38391 Fixes curl#2721 (comment) Closes curl#2728
@MarcelRaad I guess your question above was answered within #2924, right? Or are there any issues remaining I could test now that my build environment is running again? |
Everything is clear now, thanks @mback2k ! |
Fixes some build errors and compiler warnings on original MinGW as well as MinGW-w64. See individual commits for details.