Use WINVER values instead of _WIN32_WINNT_[NAME].

WINVER values are well defined, see:

https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-160
This commit is contained in:
Fabio Alessandrelli 2021-03-18 16:46:42 +01:00
parent 81029a860b
commit c1b64740fb
2 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ int addr_is_reserved(const char * addr_str)
uint32_t addr_n, address;
size_t i;
#if defined(_WIN32) && (!defined(_WIN32_WINNT_VISTA) || (_WIN32_WINNT < _WIN32_WINNT_VISTA))
#if defined(_WIN32) && _WIN32_WINNT < 0x0600 // _WIN32_WINNT_VISTA
addr_n = inet_addr(addr_str);
if (addr_n == INADDR_NONE)
return 1;

View File

@ -460,7 +460,7 @@ parseMSEARCHReply(const char * reply, int size,
static int upnp_gettimeofday(struct timeval * tv)
{
#if defined(_WIN32)
#if defined(_WIN32_WINNT_VISTA) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
#if _WIN32_WINNT >= 0x0600 // _WIN32_WINNT_VISTA
ULONGLONG ts = GetTickCount64();
#else
DWORD ts = GetTickCount();
@ -722,7 +722,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
} else {
struct in_addr mc_if;
#if defined(_WIN32)
#if defined(_WIN32_WINNT_VISTA) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
#if _WIN32_WINNT >= 0x0600 // _WIN32_WINNT_VISTA
InetPtonA(AF_INET, multicastif, &mc_if);
#else
mc_if.s_addr = inet_addr(multicastif); /* old Windows SDK do not support InetPtoA() */