mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Make the w32old build warning-clean.
Normally I never notice warnings in this build, because it runs inside bob and dumps all the warnings in a part of the build log I never look at. But I've had these fixes lying around for a while and should commit them. They're benign: all we need is an explicit declaration of strtoumax to replace the one that stdlib.h doesn't provide, and a couple more of those annoying NO_TYPECHECK modifiers on GET_WINDOWS_FUNCTION calls.
This commit is contained in:
parent
e3a14e1ad6
commit
9dcf781d01
3
defs.h
3
defs.h
@ -16,12 +16,13 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#if defined _MSC_VER && _MSC_VER < 1800
|
||||
/* Work around lack of inttypes.h in older MSVC */
|
||||
/* Work around lack of inttypes.h and strtoumax in older MSVC */
|
||||
#define PRIx32 "x"
|
||||
#define PRIu64 "I64u"
|
||||
#define PRIdMAX "I64d"
|
||||
#define PRIXMAX "I64X"
|
||||
#define SCNu64 "I64u"
|
||||
uintmax_t strtoumax(const char *nptr, char **endptr, int base);
|
||||
#else
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
@ -247,7 +247,7 @@ void sk_init(void)
|
||||
if (GetProcAddress(winsock_module, "getaddrinfo") != NULL) {
|
||||
GET_WINDOWS_FUNCTION(winsock_module, getaddrinfo);
|
||||
GET_WINDOWS_FUNCTION(winsock_module, freeaddrinfo);
|
||||
GET_WINDOWS_FUNCTION(winsock_module, getnameinfo);
|
||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, getnameinfo);
|
||||
/* This function would fail its type-check if we did one,
|
||||
* because the VS header file provides an inline definition
|
||||
* which is __cdecl instead of WINAPI. */
|
||||
@ -258,8 +258,8 @@ void sk_init(void)
|
||||
if (wship6_module) {
|
||||
GET_WINDOWS_FUNCTION(wship6_module, getaddrinfo);
|
||||
GET_WINDOWS_FUNCTION(wship6_module, freeaddrinfo);
|
||||
GET_WINDOWS_FUNCTION(wship6_module, getnameinfo);
|
||||
/* See comment above about type check */
|
||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(wship6_module, getnameinfo);
|
||||
GET_WINDOWS_FUNCTION_NO_TYPECHECK(winsock_module, gai_strerror);
|
||||
} else {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user