emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 2ff9dca: Fix WINDOWSNT/DOS_NT build


From: Eli Zaretskii
Subject: [Emacs-diffs] master 2ff9dca: Fix WINDOWSNT/DOS_NT build
Date: Mon, 3 Dec 2018 05:30:29 -0500 (EST)

branch: master
commit 2ff9dca17c5ba1658f8083e20f3bcc7e90c57bb2
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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.
---
 lib-src/emacsclient.c | 2 --
 nt/inc/ms-w32.h       | 2 +-
 src/sysdep.c          | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index a428788..c430217 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 e4dec04..df35dff 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 b054839..9901d6a 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)
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]