mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-18 10:16:51 +00:00
47d7532e09
* 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
18 lines
500 B
Plaintext
18 lines
500 B
Plaintext
# fsync.m4 serial 2
|
|
dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
|
|
dnl This file is free software; the Free Software Foundation
|
|
dnl gives unlimited permission to copy and/or distribute it,
|
|
dnl with or without modifications, as long as this notice is preserved.
|
|
|
|
AC_DEFUN([gl_FUNC_FSYNC],
|
|
[
|
|
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
|
|
AC_CHECK_FUNCS_ONCE([fsync])
|
|
if test $ac_cv_func_fsync = no; then
|
|
HAVE_FSYNC=0
|
|
fi
|
|
])
|
|
|
|
# Prerequisites of lib/fsync.c.
|
|
AC_DEFUN([gl_PREREQ_FSYNC], [:])
|