Commit 2ff9dca1 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix WINDOWSNT/DOS_NT build

Recent changes in sysdep.c and emacsclient unnecessarily
removed useful code from DOS_NT builds.  This changeset
reinstates that code.
* nt/inc/ms-w32.h (tcdrain): Redirect to _commit.
(fdatasync): No need to redirect anymore.

* lib-src/emacsclient.c (flush_stdout): Don't avoid calling
tcdrain on DOS_NT platforms.

* src/sysdep.c (reset_sys_modes): Don't ifdef away the call to
tcdrain on DOS_NT platforms.
parent 5c412405
Pipeline #194 failed with stage
in 22 minutes
......@@ -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
......
......@@ -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
......
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment