diff options
Diffstat (limited to 'src/backend/storage/file/fd.c')
-rw-r--r-- | src/backend/storage/file/fd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 195563ebe3c..e4ebb93fc92 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.121.2.2 2005/12/01 20:24:31 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.121.2.3 2006/01/17 23:52:50 tgl Exp $ * * NOTES: * @@ -265,13 +265,15 @@ int pg_fsync_writethrough(int fd) { if (enableFsync) + { #ifdef WIN32 return _commit(fd); -#elif defined(__darwin__) - return (fcntl(fd, F_FULLFSYNC, 0) == -1) ? -1 : 0; +#elif defined(F_FULLFSYNC) + return (fcntl(fd, F_FULLFSYNC, 0) == -1) ? -1 : 0; #else return -1; #endif + } else return 0; } |