1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00

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.
This commit is contained in:
Eli Zaretskii 2018-12-03 12:29:34 +02:00
parent 5c412405c7
commit 2ff9dca17c
3 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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)
{