diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/process.c b/src/process.c index 3edc3b4f061..94ca3d4b1a0 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -31,8 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 31 | #include <unistd.h> | 31 | #include <unistd.h> |
| 32 | #include <fcntl.h> | 32 | #include <fcntl.h> |
| 33 | 33 | ||
| 34 | #include "lisp.h" | ||
| 35 | |||
| 36 | /* Only MS-DOS does not define `subprocesses'. */ | 34 | /* Only MS-DOS does not define `subprocesses'. */ |
| 37 | #ifdef subprocesses | 35 | #ifdef subprocesses |
| 38 | 36 | ||
| @@ -96,6 +94,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 96 | 94 | ||
| 97 | #endif /* subprocesses */ | 95 | #endif /* subprocesses */ |
| 98 | 96 | ||
| 97 | #include "lisp.h" | ||
| 98 | |||
| 99 | #include "systime.h" | 99 | #include "systime.h" |
| 100 | #include "systty.h" | 100 | #include "systty.h" |
| 101 | 101 | ||
| @@ -132,8 +132,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 132 | #endif | 132 | #endif |
| 133 | 133 | ||
| 134 | #ifdef WINDOWSNT | 134 | #ifdef WINDOWSNT |
| 135 | extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, | 135 | #include "w32.h" |
| 136 | EMACS_TIME *, void *); | ||
| 137 | #endif | 136 | #endif |
| 138 | 137 | ||
| 139 | #ifndef SOCK_CLOEXEC | 138 | #ifndef SOCK_CLOEXEC |
| @@ -532,7 +531,9 @@ add_non_blocking_write_fd (int fd) | |||
| 532 | fd_callback_info[fd].flags |= FOR_WRITE | NON_BLOCKING_CONNECT_FD; | 531 | fd_callback_info[fd].flags |= FOR_WRITE | NON_BLOCKING_CONNECT_FD; |
| 533 | if (fd > max_desc) | 532 | if (fd > max_desc) |
| 534 | max_desc = fd; | 533 | max_desc = fd; |
| 534 | #ifdef NON_BLOCKING_CONNECT | ||
| 535 | ++num_pending_connects; | 535 | ++num_pending_connects; |
| 536 | #endif | ||
| 536 | } | 537 | } |
| 537 | 538 | ||
| 538 | static void | 539 | static void |
| @@ -560,11 +561,13 @@ delete_write_fd (int fd) | |||
| 560 | eassert (fd < MAXDESC); | 561 | eassert (fd < MAXDESC); |
| 561 | eassert (fd <= max_desc); | 562 | eassert (fd <= max_desc); |
| 562 | 563 | ||
| 564 | #ifdef NON_BLOCKING_CONNECT | ||
| 563 | if ((fd_callback_info[fd].flags & NON_BLOCKING_CONNECT_FD) != 0) | 565 | if ((fd_callback_info[fd].flags & NON_BLOCKING_CONNECT_FD) != 0) |
| 564 | { | 566 | { |
| 565 | if (--num_pending_connects < 0) | 567 | if (--num_pending_connects < 0) |
| 566 | abort (); | 568 | abort (); |
| 567 | } | 569 | } |
| 570 | #endif | ||
| 568 | fd_callback_info[fd].flags &= ~(FOR_WRITE | NON_BLOCKING_CONNECT_FD); | 571 | fd_callback_info[fd].flags &= ~(FOR_WRITE | NON_BLOCKING_CONNECT_FD); |
| 569 | if (fd_callback_info[fd].flags == 0) | 572 | if (fd_callback_info[fd].flags == 0) |
| 570 | { | 573 | { |