Re: msys inet_pton strangeness - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: msys inet_pton strangeness
Date
Msg-id CA+hUKGJNW6rS11a=jcAOKE5jRa0vDAL_54k5HAFxXFKaMS2eRg@mail.gmail.com
Whole thread Raw
In response to Re: msys inet_pton strangeness  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: msys inet_pton strangeness
List pgsql-hackers
On Sun, Sep 29, 2024 at 6:26 AM Andrew Dunstan <andrew@dunslane.net> wrote:
> We should have included ws2tcpip.h, which includes this:
>
> #define InetPtonA inet_pton
> WINSOCK_API_LINKAGE INT WSAAPI InetPtonA(INT Family, LPCSTR pStringBuf, PVOID pAddr);
>
> It's conditioned on (_WIN32_WINNT >= 0x0600), but that should be true.

Can you print out the value to be sure?  I can't imagine they'd set it
lower themselves or make it go backwards in an upgrade, but perhaps
it's somehow not being set at all, and then we do:

#if defined(_MSC_VER) && _MSC_VER >= 1900
#define MIN_WINNT 0x0600
#else
#define MIN_WINNT 0x0501
#endif

In 16 we don't do that anymore, we just always set it to 0x0A00
(commit 495ed0ef2d72).  And before 15, we didn't want that function
yet (commit c1932e542863).



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: msys inet_pton strangeness
Next
From: Andrew Kane
Date:
Subject: ORDER BY operator index scans and filtering