diff options
| author | Paul Eggert | 2013-03-13 11:42:22 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-03-13 11:42:22 -0700 |
| commit | 47d7532e093db8a5068a40c587915121ffaaad18 (patch) | |
| tree | a99ea6eca34ea0e9c8d6e8a8d6291833ce27dca5 /nt | |
| parent | c7ffccaf17d63cefd34bef0a9becc4e68df3b115 (diff) | |
| download | emacs-47d7532e093db8a5068a40c587915121ffaaad18.tar.gz emacs-47d7532e093db8a5068a40c587915121ffaaad18.zip | |
File synchronization fixes.
* admin/CPP-DEFINES (BSD_SYSTEM, HAVE_FSYNC): Remove.
* admin/merge-gnulib (GNULIB_MODULES): Add fsync, fdatasync.
* configure.ac (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
(fsync): Remove check; now done by gnulib.
* lib/fdatasync.c, lib/fsync.c, m4/fdatasync.m4, m4/fsync.m4:
New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib-src/Makefile.in (LIB_FDATASYNC): New macro.
(emacsclient${EXEEXT}): Use it.
* lib-src/emacsclient.c (main): Use fdatasync, not fsync, since we don't
care about metadata. Keep trying if interrupted.
* lib-src/movemail.c (main, popmail): Don't worry about BSD_SYSTEM, since
fsync is available everywhere (or there is a substitute). Don't
report an error if fsync returns EINVAL.
* nt/inc/ms-w32.h (fdatasync): New macro, suggested by Eli Zaretskii.
* src/Makefile.in (LIB_FDATASYNC): New macro.
(LIBES): Use it.
* src/conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
* src/fileio.c (Fwrite_region, write_region_inhibit_fsync):
Don't worry about HAVE_FSYNC, since a substitute fsync is
available if the system lacks one.
(Fwrite_regin): Retry fsync if interrupted.
Fixes: debbugs:13944
Diffstat (limited to 'nt')
| -rw-r--r-- | nt/ChangeLog | 5 | ||||
| -rw-r--r-- | nt/inc/ms-w32.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index dcda682cfc6..48c1cb8bc82 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-03-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | File synchronization fixes (Bug#13944). | ||
| 4 | * inc/ms-w32.h (fdatasync): New macro, suggested by Eli Zaretskii. | ||
| 5 | |||
| 1 | 2013-03-05 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-03-05 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | FILE's lock is now always .#FILE and may be a regular file (Bug#13807). | 8 | FILE's lock is now always .#FILE and may be a regular file (Bug#13807). |
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index 9473fbe3ca6..12402390895 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h | |||
| @@ -220,6 +220,7 @@ extern int sys_unlink (const char *); | |||
| 220 | /* Map to MSVC names. */ | 220 | /* Map to MSVC names. */ |
| 221 | #define execlp _execlp | 221 | #define execlp _execlp |
| 222 | #define execvp _execvp | 222 | #define execvp _execvp |
| 223 | #define fdatasync _commit | ||
| 223 | #define fdopen _fdopen | 224 | #define fdopen _fdopen |
| 224 | #ifndef fileno | 225 | #ifndef fileno |
| 225 | #define fileno _fileno | 226 | #define fileno _fileno |