]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
fix mingw64 detection
authorSteve Lhomme <robux4@ycbcr.xyz>
Thu, 23 Sep 2021 07:03:50 +0000 (09:03 +0200)
committerSteve Lhomme <robux4@ycbcr.xyz>
Thu, 23 Sep 2021 13:18:23 +0000 (15:18 +0200)
__MINGW64__ is only defined for 64 bits builds of mingw64 [1].
The intended test what to only use the CertEnumCRLsInStoreFunc via LoadLibrary
for some ancient mingw32 build and never for mingw64.

__MINGW64_VERSION_MAJOR is a proper define to identify mingw64 against mingw32.

[1] https://sourceforge.net/p/predef/wiki/Compilers/

Co-authored-by: Johannes Kauffmann <johanneskauffmann@hotmail.com>
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
lib/system.h

index 1e8ca7d070a7ceba02eec4d8b604f3ba28638cc9..e15c8cd33dee354bc9b04940dc46c16bee4f6c58 100644 (file)
@@ -29,7 +29,7 @@
 #include <sys/time.h>
 
 #ifdef _WIN32
-# if defined(__MINGW32__) && !defined(__MINGW64__) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
+# if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
 #  define NEED_CERT_ENUM_CRLS
 typedef PCCRL_CONTEXT WINAPI(*CertEnumCRLsInStoreFunc) (HCERTSTORE
                                                         hCertStore,