diff options
| author | Paul Eggert | 2015-03-27 10:36:15 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-03-27 10:37:14 -0700 |
| commit | 087fdee723da5968679d0392302043f10a5934bb (patch) | |
| tree | ce0c874321ccb8bf6c2476ccbff2fa9f5de2c202 /src/process.c | |
| parent | 9552a65f3187ad13f22392e17e3faf25defd259e (diff) | |
| download | emacs-087fdee723da5968679d0392302043f10a5934bb.tar.gz emacs-087fdee723da5968679d0392302043f10a5934bb.zip | |
Assume !BROKEN_NON_BLOCKING_CONNECT
From a suggestion by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00824.html
* process.c (NON_BLOCKING_CONNECT): Simplify by assuming that
BROKEN_NON_BLOCKING_CONNECT is not defined.
(SELECT_CAN_DO_WRITE_MASK): Remove, and assume it's now true.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/process.c b/src/process.c index 3fe8644b48a..2800fa58340 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -195,24 +195,15 @@ static EMACS_INT process_tick; | |||
| 195 | /* Number of events for which the user or sentinel has been notified. */ | 195 | /* Number of events for which the user or sentinel has been notified. */ |
| 196 | static EMACS_INT update_tick; | 196 | static EMACS_INT update_tick; |
| 197 | 197 | ||
| 198 | /* Define NON_BLOCKING_CONNECT if we can support non-blocking connects. */ | 198 | /* Define NON_BLOCKING_CONNECT if we can support non-blocking connects. |
| 199 | The code can be simplified by assuming NON_BLOCKING_CONNECT once | ||
| 200 | Emacs starts assuming POSIX 1003.1-2001 or later. */ | ||
| 199 | 201 | ||
| 200 | /* Only W32 has this, it really means that select can't take write mask. */ | 202 | #if (defined HAVE_SELECT \ |
| 201 | #ifdef BROKEN_NON_BLOCKING_CONNECT | 203 | && (defined GNU_LINUX || defined HAVE_GETPEERNAME) \ |
| 202 | #undef NON_BLOCKING_CONNECT | 204 | && (defined EWOULDBLOCK || defined EINPROGRESS)) |
| 203 | enum { SELECT_CAN_DO_WRITE_MASK = false }; | 205 | # define NON_BLOCKING_CONNECT |
| 204 | #else | 206 | #endif |
| 205 | enum { SELECT_CAN_DO_WRITE_MASK = true }; | ||
| 206 | #ifndef NON_BLOCKING_CONNECT | ||
| 207 | #ifdef HAVE_SELECT | ||
| 208 | #if defined (HAVE_GETPEERNAME) || defined (GNU_LINUX) | ||
| 209 | #if defined (EWOULDBLOCK) || defined (EINPROGRESS) | ||
| 210 | #define NON_BLOCKING_CONNECT | ||
| 211 | #endif /* EWOULDBLOCK || EINPROGRESS */ | ||
| 212 | #endif /* HAVE_GETPEERNAME || GNU_LINUX */ | ||
| 213 | #endif /* HAVE_SELECT */ | ||
| 214 | #endif /* NON_BLOCKING_CONNECT */ | ||
| 215 | #endif /* BROKEN_NON_BLOCKING_CONNECT */ | ||
| 216 | 207 | ||
| 217 | /* Define DATAGRAM_SOCKETS if datagrams can be used safely on | 208 | /* Define DATAGRAM_SOCKETS if datagrams can be used safely on |
| 218 | this system. We need to read full packets, so we need a | 209 | this system. We need to read full packets, so we need a |
| @@ -4606,7 +4597,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4606 | Available = input_wait_mask; | 4597 | Available = input_wait_mask; |
| 4607 | Writeok = write_mask; | 4598 | Writeok = write_mask; |
| 4608 | check_delay = wait_proc ? 0 : process_output_delay_count; | 4599 | check_delay = wait_proc ? 0 : process_output_delay_count; |
| 4609 | check_write = SELECT_CAN_DO_WRITE_MASK; | 4600 | check_write = true; |
| 4610 | } | 4601 | } |
| 4611 | 4602 | ||
| 4612 | /* If frame size has changed or the window is newly mapped, | 4603 | /* If frame size has changed or the window is newly mapped, |