diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index a428788344e..c430217470f 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1745,10 +1745,8 @@ static void flush_stdout (HSOCKET emacs_socket) { fflush (stdout); -#ifndef DOS_NT while (tcdrain (STDOUT_FILENO) != 0 && errno == EINTR) act_on_signals (emacs_socket); -#endif } int diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index e4dec04fb8b..df35dff91b5 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -311,7 +311,7 @@ extern int execve (const char *, char * const *, char * const *); #else extern intptr_t execve (const char *, char * const *, char * const *); #endif -#define fdatasync _commit +#define tcdrain _commit #define fdopen _fdopen #define fsync _commit #define ftruncate _chsize diff --git a/src/sysdep.c b/src/sysdep.c index b054839795b..9901d6a089e 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1519,11 +1519,11 @@ reset_sys_modes (struct tty_display_info *tty_out) if (tty_out->terminal->reset_terminal_modes_hook) tty_out->terminal->reset_terminal_modes_hook (tty_out->terminal); -#ifndef DOS_NT /* Avoid possible loss of output when changing terminal modes. */ while (tcdrain (fileno (tty_out->output)) != 0 && errno == EINTR) continue; +#ifndef DOS_NT # ifdef F_SETOWN if (interrupt_input) {