summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-12-02 23:11:09 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2018-12-02 23:55:01 -0800
commitf5090b91299cbd36901bef7b94aeef618b1bc6d8 (patch)
treed5dffd1d6cc0fb6acf8aa4b99baa41d0f121f4ec /m4
parent25a33aa2d173d933af294a7ea130960c720e1be5 (diff)
downloademacs-f5090b91299cbd36901bef7b94aeef618b1bc6d8.tar.gz
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 'm4')
-rw-r--r--m4/fdatasync.m432
-rw-r--r--m4/gnulib-comp.m48
2 files changed, 0 insertions, 40 deletions
diff --git a/m4/fdatasync.m4 b/m4/fdatasync.m4
deleted file mode 100644
index fd8e4320d21..00000000000
--- a/m4/fdatasync.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-# fdatasync.m4 serial 4
-dnl Copyright (C) 2008-2018 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_FDATASYNC],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-
- dnl Using AC_CHECK_FUNCS_ONCE would break our subsequent AC_SEARCH_LIBS
- AC_CHECK_DECLS_ONCE([fdatasync])
- LIB_FDATASYNC=
- AC_SUBST([LIB_FDATASYNC])
-
- if test $ac_cv_have_decl_fdatasync = no; then
- HAVE_DECL_FDATASYNC=0
- dnl Mac OS X 10.7 has fdatasync but does not declare it.
- AC_CHECK_FUNCS([fdatasync])
- if test $ac_cv_func_fdatasync = no; then
- HAVE_FDATASYNC=0
- fi
- else
- dnl Solaris <= 2.6 has fdatasync() in libposix4.
- dnl Solaris 7..10 has it in librt.
- gl_saved_libs=$LIBS
- AC_SEARCH_LIBS([fdatasync], [rt posix4],
- [test "$ac_cv_search_fdatasync" = "none required" ||
- LIB_FDATASYNC=$ac_cv_search_fdatasync])
- LIBS=$gl_saved_libs
- fi
-])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index a4dddbad738..d31dd5d533c 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -81,7 +81,6 @@ AC_DEFUN([gl_EARLY],
# Code from module faccessat:
# Code from module fcntl:
# Code from module fcntl-h:
- # Code from module fdatasync:
# Code from module fdopendir:
# Code from module filemode:
# Code from module filevercmp:
@@ -241,11 +240,6 @@ AC_DEFUN([gl_INIT],
fi
gl_FCNTL_MODULE_INDICATOR([fcntl])
gl_FCNTL_H
- gl_FUNC_FDATASYNC
- if test $HAVE_FDATASYNC = 0; then
- AC_LIBOBJ([fdatasync])
- fi
- gl_UNISTD_MODULE_INDICATOR([fdatasync])
gl_FUNC_FDOPENDIR
if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
AC_LIBOBJ([fdopendir])
@@ -880,7 +874,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/faccessat.c
lib/fcntl.c
lib/fcntl.in.h
- lib/fdatasync.c
lib/fdopendir.c
lib/filemode.c
lib/filemode.h
@@ -1028,7 +1021,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/fcntl-o.m4
m4/fcntl.m4
m4/fcntl_h.m4
- m4/fdatasync.m4
m4/fdopendir.m4
m4/filemode.m4
m4/flexmember.m4