Re: msys inet_pton strangeness

2024-09-30 Thread Andrew Dunstan
On 2024-09-30 Mo 11:11 AM, Tom Lane wrote: Andrew Dunstan writes: On 2024-09-30 Mo 10:08 AM, Tom Lane wrote: Not entirely ... if fairywren had been generating that warning all along, I would have noticed it long ago, because I periodically scrape the BF database for compiler warnings. There

Re: msys inet_pton strangeness

2024-09-30 Thread Tom Lane
Andrew Dunstan writes: > On 2024-09-30 Mo 10:08 AM, Tom Lane wrote: >> Not entirely ... if fairywren had been generating that warning all >> along, I would have noticed it long ago, because I periodically >> scrape the BF database for compiler warnings. There has to have >> been some recent chang

Re: msys inet_pton strangeness

2024-09-30 Thread Andrew Dunstan
On 2024-09-30 Mo 10:08 AM, Tom Lane wrote: Andrew Dunstan writes: Ah, so this is because gcc 14.1.0 treats this as an error but gcc 12.2.0 treats it as a warning. Now it makes sense. Not entirely ... if fairywren had been generating that warning all along, I would have noticed it long ago, b

Re: msys inet_pton strangeness

2024-09-30 Thread Tom Lane
Andrew Dunstan writes: > Ah, so this is because gcc 14.1.0 treats this as an error but gcc 12.2.0 > treats it as a warning. Now it makes sense. Not entirely ... if fairywren had been generating that warning all along, I would have noticed it long ago, because I periodically scrape the BF databas

Re: msys inet_pton strangeness

2024-09-30 Thread Andrew Dunstan
On 2024-09-29 Su 6:28 PM, Thomas Munro wrote: Just an idea... --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -16,7 +16,7 @@ * get support for GetLocaleInfoEx() with locales. For everything else * the minimum version is Windows XP (0x0501). */ -#if defined(_MSC_VER) &

Re: msys inet_pton strangeness

2024-09-30 Thread Andrew Dunstan
On 2024-09-30 Mo 7:00 AM, Alexander Lakhin wrote: Hello Andrew and Thomas, 29.09.2024 18:47, Andrew Dunstan пишет: I'm inclined to think we might need to reverse the order of the last two. TBH I don't really understand how this has worked up to now. I've looked at the last successful ru

Re: msys inet_pton strangeness

2024-09-30 Thread Alexander Lakhin
Hello Andrew and Thomas, 29.09.2024 18:47, Andrew Dunstan пишет: I'm inclined to think we might need to reverse the order of the last two. TBH I don't really understand how this has worked up to now. I've looked at the last successful run [1] and discovered that fe-secure-common.c didn't c

Re: msys inet_pton strangeness

2024-09-29 Thread Thomas Munro
Just an idea... --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -16,7 +16,7 @@ * get support for GetLocaleInfoEx() with locales. For everything else * the minimum version is Windows XP (0x0501). */ -#if defined(_MSC_VER) && _MSC_VER >= 1900 +#if !defined(_MSC_VER) || _MSC_VE

Re: msys inet_pton strangeness

2024-09-29 Thread Alexander Lakhin
29.09.2024 18:47, Andrew Dunstan wrote: Yeah, src/include/port/win32/sys/socket.h has: #include #include #include I'm inclined to think we might need to reverse the order of the last two. TBH I don't really understand how this has worked up to now. As far as I can see, in my

Re: msys inet_pton strangeness

2024-09-29 Thread Tom Lane
Andrew Dunstan writes: > Yeah, src/include/port/win32/sys/socket.h has: > #include > #include > #include > I'm inclined to think we might need to reverse the order of the last > two. TBH I don't really understand how this has worked up to now. I see the same in src/include/port/

Re: msys inet_pton strangeness

2024-09-29 Thread Andrew Dunstan
On 2024-09-29 Su 1:00 AM, Alexander Lakhin wrote: Hello Thomas and Andrew, 28.09.2024 23:52, Thomas Munro wrote: On Sun, Sep 29, 2024 at 6:26 AM Andrew Dunstan wrote: We should have included ws2tcpip.h, which includes this: #define InetPtonA inet_pton WINSOCK_API_LINKAGE INT WSAAPI InetPton

Re: msys inet_pton strangeness

2024-09-28 Thread Alexander Lakhin
Hello Thomas and Andrew, 28.09.2024 23:52, Thomas Munro wrote: On Sun, Sep 29, 2024 at 6:26 AM Andrew Dunstan 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'

Re: msys inet_pton strangeness

2024-09-28 Thread Thomas Munro
On Sun, Sep 29, 2024 at 6:26 AM Andrew Dunstan 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 sho

Re: msys inet_pton strangeness

2024-09-28 Thread Tom Lane
Andrew Dunstan writes: > 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. > So I'm st

Re: msys inet_pton strangeness

2024-09-28 Thread Andrew Dunstan
On 2024-09-28 Sa 11:49 AM, Tom Lane wrote: Andrew Dunstan writes: It's complaining like this: C:/tools/xmsys64/home/pgrunner/bf/root/REL_15_STABLE/pgsql/src/interfaces/libpq/fe-secure-common.c:219:21: error: implicit declaration of function 'inet_pton'; did you mean 'inet_aton'? [-Wimplicit-

Re: msys inet_pton strangeness

2024-09-28 Thread Tom Lane
Andrew Dunstan writes: > It's complaining like this: > C:/tools/xmsys64/home/pgrunner/bf/root/REL_15_STABLE/pgsql/src/interfaces/libpq/fe-secure-common.c:219:21: > error: implicit declaration of function 'inet_pton'; did you mean > 'inet_aton'? [-Wimplicit-function-declaration] >219 |