On Tue, Jul 19, 2022 at 4:54 PM Michael Paquier <mich...@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.