Re: Windows now has fdatasync() - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Windows now has fdatasync()
Date
Msg-id CA+hUKGKr8PjdjGibGEVHCkQwokYFV4sie-JHbCBq1zb1mdf+XA@mail.gmail.com
Whole thread Raw
In response to Re: Windows now has fdatasync()  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Windows now has fdatasync()
List pgsql-hackers
On Tue, Jul 19, 2022 at 4:54 PM Michael Paquier <michael@paquier.xyz> wrote:
> Do you still need HAVE_DECL_FDATASYNC?

I guess so, because that is currently used for macOS, and with this
patch would also be used to control the declaration for Windows.  The
alternative would be to explicitly test for WIN32 or __darwin__.

The reason we need it for macOS is that they have had fdatasync
function for many years now, and configure detects it, but they
haven't ever declared it in a header, so we (accidentally?) do it in
c.h.  We didn't set that up for Apple!  The commit that added it was
33cc5d8a, which was about a month before Apple shipped the first
version of OS X (and long before they defined the function).  So there
must have been another Unix with that problem, lost in the mists of
time.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Making pg_rewind faster
Next
From: Steve Chavez
Date:
Subject: Re: Allow placeholders in ALTER ROLE w/o superuser