mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Condition out some API type-checks in the MinGW build.
A couple of the functions for which I was already turning off the type check for old Visual Studio turn out to also need it turning off for MinGW.
This commit is contained in:
parent
89fff90de7
commit
b189df947d
@ -282,9 +282,10 @@ static char *sk_handle_peer_info(Socket s)
|
|||||||
|
|
||||||
if (!kernel32_module) {
|
if (!kernel32_module) {
|
||||||
kernel32_module = load_system32_dll("kernel32.dll");
|
kernel32_module = load_system32_dll("kernel32.dll");
|
||||||
#if defined _MSC_VER && _MSC_VER < 1900
|
#if (defined _MSC_VER && _MSC_VER < 1900) || defined __MINGW32__
|
||||||
/* For older Visual Studio, this function isn't available in
|
/* For older Visual Studio, and MinGW too (at least as of
|
||||||
* the header files to type-check */
|
* Ubuntu 16.04), this function isn't available in the header
|
||||||
|
* files to type-check */
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(
|
GET_WINDOWS_FUNCTION_NO_TYPECHECK(
|
||||||
kernel32_module, GetNamedPipeClientProcessId);
|
kernel32_module, GetNamedPipeClientProcessId);
|
||||||
#else
|
#else
|
||||||
|
@ -314,9 +314,9 @@ void sk_init(void)
|
|||||||
GET_WINDOWS_FUNCTION(winsock_module, getservbyname);
|
GET_WINDOWS_FUNCTION(winsock_module, getservbyname);
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, inet_addr);
|
GET_WINDOWS_FUNCTION(winsock_module, inet_addr);
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, inet_ntoa);
|
GET_WINDOWS_FUNCTION(winsock_module, inet_ntoa);
|
||||||
#if defined _MSC_VER && _MSC_VER < 1900
|
#if (defined _MSC_VER && _MSC_VER < 1900) || defined __MINGW32__
|
||||||
/* Older Visual Studio doesn't know about this function at all, so
|
/* Older Visual Studio, and MinGW as of Ubuntu 16.04, don't know
|
||||||
* can't type-check it */
|
* about this function at all, so can't type-check it */
|
||||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, inet_ntop);
|
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, inet_ntop);
|
||||||
#else
|
#else
|
||||||
GET_WINDOWS_FUNCTION(winsock_module, inet_ntop);
|
GET_WINDOWS_FUNCTION(winsock_module, inet_ntop);
|
||||||
|
Loading…
Reference in New Issue
Block a user