diff options
| author | Eli Zaretskii <eliz@gnu.org> | 2013-08-26 21:42:11 +0300 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2013-08-26 21:42:11 +0300 |
| commit | 6e9fb70cdf763da6d264932f14f5a67d354ec38d (patch) | |
| tree | 8c9ecd47a5078c8b1c20662853a095523a7b1989 /src/process.c | |
| parent | c160274456eb7bb09776b888f5274933f2ec2399 (diff) | |
| download | emacs-6e9fb70cdf763da6d264932f14f5a67d354ec38d.tar.gz | |
Fix MS-Windows build.
src/callproc.c:
src/emacs.c:
src/filelock.c:
src/process.c:
src/sysdep.c:
src/w32.c: Reshuffle Windows-specific headers to avoid errors with
redefinition of fd_set etc.
src/process.c: Don't use num_pending_connects when
NON_BLOCKING_CONNECT is not defined.
src/sysselect.h: Move definitions of FD_* macros and of SELECT_TYPE
here from w32.h.
src/w32proc.c (sys_select): Adjust the argument types to what
thread.h expects.
nt/inc/sys/socket.h: Include stdint.h. Include sysselect.h instead
of w32.h.
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/>. */ #include <unistd.h> #include <fcntl.h> -#include "lisp.h" - /* Only MS-DOS does not define `subprocesses'. */ #ifdef subprocesses @@ -96,6 +94,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #endif /* subprocesses */ +#include "lisp.h" + #include "systime.h" #include "systty.h" @@ -132,8 +132,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #endif #ifdef WINDOWSNT -extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, - EMACS_TIME *, void *); +#include "w32.h" #endif #ifndef SOCK_CLOEXEC @@ -532,7 +531,9 @@ add_non_blocking_write_fd (int fd) fd_callback_info[fd].flags |= FOR_WRITE | NON_BLOCKING_CONNECT_FD; if (fd > max_desc) max_desc = fd; +#ifdef NON_BLOCKING_CONNECT ++num_pending_connects; +#endif } static void @@ -560,11 +561,13 @@ delete_write_fd (int fd) eassert (fd < MAXDESC); eassert (fd <= max_desc); +#ifdef NON_BLOCKING_CONNECT if ((fd_callback_info[fd].flags & NON_BLOCKING_CONNECT_FD) != 0) { if (--num_pending_connects < 0) abort (); } +#endif fd_callback_info[fd].flags &= ~(FOR_WRITE | NON_BLOCKING_CONNECT_FD); if (fd_callback_info[fd].flags == 0) { |
