[gnutls-devel] [PATCH 2/4] Set _WIN32_WINNT to 0x600, at least with some MinGW versions ncrypt.h checks this define to be at least 0x600.
Tim Kosse
tim.kosse at filezilla-project.org
Sat Apr 18 13:27:16 CEST 2015
Hi,
merely #including ncrypt.h doesn't link against ncrypt.dll, nor does it
add a library dependency. For that -lncrypt would be needed as linker
argument and one of the exported symbols would need to be used.
GnuTLS already loads ncrypt.dll dynamically, nonetheless it still needs
to include ncrypt.h in order to use the constants defined in it.
Regards,
Tim
On 2015-04-18 12:59, Eli Zaretskii wrote:
>> From: Tim Kosse <tim.kosse at filezilla-project.org>
>> Date: Sat, 18 Apr 2015 11:38:55 +0200
>>
>> +// Before including any Windows header we need to set _WIN32_WINNT to Vista
>> +// (or higher) so that the NCRYPT stuff can be used.
>> +#if _WIN32_WINNT < 0x600
>> +#undef _WIN32_WINNT
>> +#define _WIN32_WINNT 0x600
>> +#endif
>
> Doesn't this mean the produced GnuTLS will refuse to run on XP and
> older, even if the NCRYPT functionality is not used at all, because it
> will be linked against ncrypt.dll? If so, I don't think this is the
> right fix; instead, GnuTLS should load ncrypt.dll dynamically, when
> needed, and call the functions from there via pointers.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20150418/b382f38b/attachment.sig>
More information about the Gnutls-devel
mailing list