diff options
| author | Paul Eggert | 2018-12-02 23:11:09 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-12-02 23:55:01 -0800 |
| commit | f5090b91299cbd36901bef7b94aeef618b1bc6d8 (patch) | |
| tree | d5dffd1d6cc0fb6acf8aa4b99baa41d0f121f4ec /lib | |
| parent | 25a33aa2d173d933af294a7ea130960c720e1be5 (diff) | |
| download | emacs-f5090b91299cbd36901bef7b94aeef618b1bc6d8.tar.gz 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')
| -rw-r--r-- | lib/fdatasync.c | 27 | ||||
| -rw-r--r-- | lib/gnulib.mk.in | 13 |
2 files changed, 0 insertions, 40 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 @@ | |||
| 1 | /* Emulate fdatasync on platforms that lack it. | ||
| 2 | |||
| 3 | Copyright (C) 2011-2018 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This library is free software; you can redistribute it and/or | ||
| 6 | modify it under the terms of the GNU General Public | ||
| 7 | License as published by the Free Software Foundation; either | ||
| 8 | version 3 of the License, or (at your option) any later version. | ||
| 9 | |||
| 10 | This library is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | #include <config.h> | ||
| 19 | #include <unistd.h> | ||
| 20 | |||
| 21 | int | ||
| 22 | fdatasync (int fd) | ||
| 23 | { | ||
| 24 | /* This does more work than strictly necessary, but is the best we | ||
| 25 | can do portably. */ | ||
| 26 | return fsync (fd); | ||
| 27 | } | ||
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index eca073d0e50..aa32dccb3f7 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -92,7 +92,6 @@ | |||
| 92 | # faccessat \ | 92 | # faccessat \ |
| 93 | # fcntl \ | 93 | # fcntl \ |
| 94 | # fcntl-h \ | 94 | # fcntl-h \ |
| 95 | # fdatasync \ | ||
| 96 | # fdopendir \ | 95 | # fdopendir \ |
| 97 | # filemode \ | 96 | # filemode \ |
| 98 | # filevercmp \ | 97 | # filevercmp \ |
| @@ -731,7 +730,6 @@ LIB_ACL = @LIB_ACL@ | |||
| 731 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ | 730 | LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ |
| 732 | LIB_EACCESS = @LIB_EACCESS@ | 731 | LIB_EACCESS = @LIB_EACCESS@ |
| 733 | LIB_EXECINFO = @LIB_EXECINFO@ | 732 | LIB_EXECINFO = @LIB_EXECINFO@ |
| 734 | LIB_FDATASYNC = @LIB_FDATASYNC@ | ||
| 735 | LIB_MATH = @LIB_MATH@ | 733 | LIB_MATH = @LIB_MATH@ |
| 736 | LIB_PTHREAD = @LIB_PTHREAD@ | 734 | LIB_PTHREAD = @LIB_PTHREAD@ |
| 737 | LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@ | 735 | LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@ |
| @@ -1586,17 +1584,6 @@ EXTRA_DIST += fcntl.in.h | |||
| 1586 | endif | 1584 | endif |
| 1587 | ## end gnulib module fcntl-h | 1585 | ## end gnulib module fcntl-h |
| 1588 | 1586 | ||
| 1589 | ## begin gnulib module fdatasync | ||
| 1590 | ifeq (,$(OMIT_GNULIB_MODULE_fdatasync)) | ||
| 1591 | |||
| 1592 | |||
| 1593 | EXTRA_DIST += fdatasync.c | ||
| 1594 | |||
| 1595 | EXTRA_libgnu_a_SOURCES += fdatasync.c | ||
| 1596 | |||
| 1597 | endif | ||
| 1598 | ## end gnulib module fdatasync | ||
| 1599 | |||
| 1600 | ## begin gnulib module fdopendir | 1587 | ## begin gnulib module fdopendir |
| 1601 | ifeq (,$(OMIT_GNULIB_MODULE_fdopendir)) | 1588 | ifeq (,$(OMIT_GNULIB_MODULE_fdopendir)) |
| 1602 | 1589 | ||