]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix WINDOWSNT/DOS_NT build
authorEli Zaretskii <eliz@gnu.org>
Mon, 3 Dec 2018 10:29:34 +0000 (12:29 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 3 Dec 2018 10:29:34 +0000 (12:29 +0200)
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
nt/inc/ms-w32.h
src/sysdep.c

index a428788344e8f15eec5cc4eef1916b303ddad515..c430217470f7d5e1b079aafa5228793994ffcffb 100644 (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
index e4dec04fb8bc2907e43bec95cde53453f90c931c..df35dff91b5ea6bd25097370d4da2266e4b9aac2 100644 (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
index b054839795b423b52ca6066e559da1f66ef252ca..9901d6a089e36c6da58063d97e00822f683c1420 100644 (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)
     {