Re: Clean up some old cruft related to Windows - Mailing list pgsql-hackers

From Juan José Santamaría Flecha
Subject Re: Clean up some old cruft related to Windows
Date
Msg-id CAC+AXB3ZEu5Sf_z8kdQEhpHs6TNY_9ZVR9b=f+a-rH_P_zDpcA@mail.gmail.com
Whole thread Raw
In response to Re: Clean up some old cruft related to Windows  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Clean up some old cruft related to Windows  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers


On Thu, Dec 19, 2019 at 5:47 AM Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote:
At Thu, 19 Dec 2019 11:15:26 +0900, Michael Paquier <michael@paquier.xyz> wrote in
> Hi all,
>
> As discussed here, there is in the tree a couple of things related to
> past versions of Windows:
> https://www.postgresql.org/message-id/201912180219SUSv254.GE1836@paquier.xyz
>
> So I have been looking at that more closely, and found more:
> - MIN_WINNT can be removed from win32.h thanks to d9dd406 which has
> added a requirement on C99 with Windows 7 as minimum platform
> supported.  (The issue mentioned previously.)
> - pipe_read_line(), used when finding another binary for a given
> installation via find_other_exec() has some special handling related
> to Windows 2000 and older versions.
> - When trying to load getaddrinfo(), we try to load it from
> wship6.ddl, which was something needed in Windows 2000, but newer
> Windows versions include it in ws2_32.dll.
> - A portion of the docs still refer to Windows 98.
>
> Thoughts?

I think MIN_WINNT is definitely emovable.


This is probably not an issue for the supported MSVC and their SDK, but current MinGW defaults to Windows 2003 [1]. So I would suggest a logic like:

#define WINNTVER(ver) ((ver) >> 16)
#define NTDDI_VERSION 0x06000100
#define _WIN32_WINNT WINNTVER(NTDDI_VERSION)


Regards,

Juan José Santamaría Flecha

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: TCP option assign hook doesn't work well if option not supported
Next
From: Robert Haas
Date:
Subject: Re: Optimizing TransactionIdIsCurrentTransactionId()