diff options
| author | Eli Zaretskii | 2018-12-03 12:29:34 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-12-03 12:29:34 +0200 |
| commit | 2ff9dca17c5ba1658f8083e20f3bcc7e90c57bb2 (patch) | |
| tree | 17fa43e345070711647d7be2b4ad28d80d6babfe | |
| parent | 5c412405c7422b356484a933179f852c30ce2f24 (diff) | |
| download | emacs-2ff9dca17c5ba1658f8083e20f3bcc7e90c57bb2.tar.gz emacs-2ff9dca17c5ba1658f8083e20f3bcc7e90c57bb2.zip | |
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.
| -rw-r--r-- | lib-src/emacsclient.c | 2 | ||||
| -rw-r--r-- | nt/inc/ms-w32.h | 2 | ||||
| -rw-r--r-- | src/sysdep.c | 2 |
3 files changed, 2 insertions, 4 deletions
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 | |||
| 1745 | flush_stdout (HSOCKET emacs_socket) | 1745 | flush_stdout (HSOCKET emacs_socket) |
| 1746 | { | 1746 | { |
| 1747 | fflush (stdout); | 1747 | fflush (stdout); |
| 1748 | #ifndef DOS_NT | ||
| 1749 | while (tcdrain (STDOUT_FILENO) != 0 && errno == EINTR) | 1748 | while (tcdrain (STDOUT_FILENO) != 0 && errno == EINTR) |
| 1750 | act_on_signals (emacs_socket); | 1749 | act_on_signals (emacs_socket); |
| 1751 | #endif | ||
| 1752 | } | 1750 | } |
| 1753 | 1751 | ||
| 1754 | int | 1752 | 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 *); | |||
| 311 | #else | 311 | #else |
| 312 | extern intptr_t execve (const char *, char * const *, char * const *); | 312 | extern intptr_t execve (const char *, char * const *, char * const *); |
| 313 | #endif | 313 | #endif |
| 314 | #define fdatasync _commit | 314 | #define tcdrain _commit |
| 315 | #define fdopen _fdopen | 315 | #define fdopen _fdopen |
| 316 | #define fsync _commit | 316 | #define fsync _commit |
| 317 | #define ftruncate _chsize | 317 | #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) | |||
| 1519 | if (tty_out->terminal->reset_terminal_modes_hook) | 1519 | if (tty_out->terminal->reset_terminal_modes_hook) |
| 1520 | tty_out->terminal->reset_terminal_modes_hook (tty_out->terminal); | 1520 | tty_out->terminal->reset_terminal_modes_hook (tty_out->terminal); |
| 1521 | 1521 | ||
| 1522 | #ifndef DOS_NT | ||
| 1523 | /* Avoid possible loss of output when changing terminal modes. */ | 1522 | /* Avoid possible loss of output when changing terminal modes. */ |
| 1524 | while (tcdrain (fileno (tty_out->output)) != 0 && errno == EINTR) | 1523 | while (tcdrain (fileno (tty_out->output)) != 0 && errno == EINTR) |
| 1525 | continue; | 1524 | continue; |
| 1526 | 1525 | ||
| 1526 | #ifndef DOS_NT | ||
| 1527 | # ifdef F_SETOWN | 1527 | # ifdef F_SETOWN |
| 1528 | if (interrupt_input) | 1528 | if (interrupt_input) |
| 1529 | { | 1529 | { |