diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-02-14 12:56:36 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-02-14 12:56:36 +0100 |
commit | a787019518a540a7b4d0070f15467931b870ac89 (patch) | |
tree | 684243a253d30b00c171f25144798f80400ecc4b /src/memfile.c | |
parent | 5fd0f5052f9a312bb4cfe7b4176b1211d45127ee (diff) | |
download | vim-git-a787019518a540a7b4d0070f15467931b870ac89.tar.gz |
patch 8.1.0915: fsync() may not work properly on Macv8.1.0915
Problem: fsync() may not work properly on Mac.
Solution: Use fcntl() with F_FULLFSYNC. (suggested by Justin M. Keyes)
Diffstat (limited to 'src/memfile.c')
-rw-r--r-- | src/memfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/memfile.c b/src/memfile.c index f2e774a4e..1a527340a 100644 --- a/src/memfile.c +++ b/src/memfile.c @@ -600,7 +600,7 @@ mf_sync(memfile_T *mfp, int flags) */ if (STRCMP(p_sws, "fsync") == 0) { - if (fsync(mfp->mf_fd)) + if (vim_fsync(mfp->mf_fd)) status = FAIL; } else @@ -617,7 +617,7 @@ mf_sync(memfile_T *mfp, int flags) #ifdef VMS if (STRCMP(p_sws, "fsync") == 0) { - if (fsync(mfp->mf_fd)) + if (vim_fsync(mfp->mf_fd)) status = FAIL; } #endif @@ -627,7 +627,7 @@ mf_sync(memfile_T *mfp, int flags) #endif #ifdef AMIGA # if defined(__AROS__) || defined(__amigaos4__) - if (fsync(mfp->mf_fd) != 0) + if (vim_fsync(mfp->mf_fd) != 0) status = FAIL; # else /* |