From d2e150831af85fd30742f551a497db6639d91d0b Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Fri, 5 Aug 2022 16:10:05 +1200 Subject: Remove configure probe for fdatasync. fdatasync() is in SUSv2, and all targeted Unix systems have it. We have a replacement function for Windows. We retain the probe for the function declaration, which allows us to supply the mysteriously missing declaration for macOS, and also for Windows. No need to keep a HAVE_FDATASYNC macro around. Also rename src/port/fdatasync.c to win32fdatasync.c since it's only for Windows. Reviewed-by: Tom Lane Reviewed-by: Andres Freund Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com Discussion: https://postgr.es/m/CA%2BhUKGJZJVO%3DiX%2Beb-PXi2_XS9ZRqnn_4URh0NUQOwt6-_51xQ%40mail.gmail.com --- src/backend/storage/file/fd.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/backend/storage/file/fd.c') diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 5a2eb012381..ccb540d6178 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -442,20 +442,12 @@ pg_fsync_writethrough(int fd) /* * pg_fdatasync --- same as fdatasync except does nothing if enableFsync is off - * - * Not all platforms have fdatasync; treat as fsync if not available. */ int pg_fdatasync(int fd) { if (enableFsync) - { -#ifdef HAVE_FDATASYNC return fdatasync(fd); -#else - return fsync(fd); -#endif - } else return 0; } -- cgit v1.2.3