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 /lib-src/Makefile.in | |
| 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 'lib-src/Makefile.in')
| -rw-r--r-- | lib-src/Makefile.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 8a6960ee2fe..7069af9767a 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -161,6 +161,8 @@ LIBRESOLV=@LIBRESOLV@ | |||
| 161 | LIBS_MAIL=@LIBS_MAIL@ | 161 | LIBS_MAIL=@LIBS_MAIL@ |
| 162 | ## empty or -lrt or -lposix4 if HAVE_CLOCK_GETTIME | 162 | ## empty or -lrt or -lposix4 if HAVE_CLOCK_GETTIME |
| 163 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ | 163 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ |
| 164 | ## empty or -lrt or -lposix4 if HAVE_FDATASYNC | ||
| 165 | LIB_FDATASYNC = @LIB_FDATASYNC@ | ||
| 164 | 166 | ||
| 165 | ## Extra libraries to use when linking movemail. | 167 | ## Extra libraries to use when linking movemail. |
| 166 | LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ | 168 | LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ |
| @@ -334,7 +336,7 @@ pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h) | |||
| 334 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(config_h) | 336 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(config_h) |
| 335 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ | 337 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ |
| 336 | -DVERSION="\"${version}\"" \ | 338 | -DVERSION="\"${version}\"" \ |
| 337 | $(LOADLIBES) -o emacsclient | 339 | $(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient |
| 338 | 340 | ||
| 339 | hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h) | 341 | hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h) |
| 340 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl | 342 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl |