aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorEli Zaretskii2013-08-26 21:42:11 +0300
committerEli Zaretskii2013-08-26 21:42:11 +0300
commit6e9fb70cdf763da6d264932f14f5a67d354ec38d (patch)
tree8c9ecd47a5078c8b1c20662853a095523a7b1989 /src/process.c
parentc160274456eb7bb09776b888f5274933f2ec2399 (diff)
downloademacs-6e9fb70cdf763da6d264932f14f5a67d354ec38d.tar.gz
emacs-6e9fb70cdf763da6d264932f14f5a67d354ec38d.zip
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.c11
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
135extern 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
538static void 539static 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 {