diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-12-02 23:11:09 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-12-02 23:55:01 -0800 |
commit | f5090b91299cbd36901bef7b94aeef618b1bc6d8 (patch) | |
tree | d5dffd1d6cc0fb6acf8aa4b99baa41d0f121f4ec /lib/fdatasync.c | |
parent | 25a33aa2d173d933af294a7ea130960c720e1be5 (diff) | |
download | emacs-f5090b91299cbd36901bef7b94aeef618b1bc6d8.tar.gz emacs-f5090b91299cbd36901bef7b94aeef618b1bc6d8.tar.bz2 emacs-f5090b91299cbd36901bef7b94aeef618b1bc6d8.zip |
Use tcdrain, not fdatasync, to drain ttys
fdatasync is for storage devices, not ttys.
* admin/merge-gnulib (GNULIB_MODULES): Remove fdatasync.
* lib/fdatasync.c, m4/fdatasync.m4: Remove.
* lib-src/Makefile.in (LIB_FDATASYNC):
* src/Makefile.in (LIB_FDATASYNC):
Remove. All uses removed.
* lib-src/emacsclient.c [!DOS_NT]:
Include <termios.h>, for tcdrain.
* lib-src/emacsclient.c (flush_stdout):
* src/sysdep.c (reset_sys_modes): On ttys, use tcdrain instead
of fdatasync (except don’t use either function if DOS_NT).
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
Diffstat (limited to 'lib/fdatasync.c')
-rw-r--r-- | lib/fdatasync.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/fdatasync.c b/lib/fdatasync.c deleted file mode 100644 index c474e3dd36c..00000000000 --- a/lib/fdatasync.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Emulate fdatasync on platforms that lack it. - - Copyright (C) 2011-2018 Free Software Foundation, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. */ - -#include <config.h> -#include <unistd.h> - -int -fdatasync (int fd) -{ - /* This does more work than strictly necessary, but is the best we - can do portably. */ - return fsync (fd); -} |