summaryrefslogtreecommitdiff
path: root/nt
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-07-07 21:48:16 +0300
committerEli Zaretskii <eliz@gnu.org>2013-07-07 21:48:16 +0300
commit1d44267275efdcee3c3584eaa79baccad54266b3 (patch)
tree8d60e01abe034165811f5184c8e39afe6b367d68 /nt
parent067428c1717acd28f205c2cff93f0583eb347f4c (diff)
downloademacs-1d44267275efdcee3c3584eaa79baccad54266b3.tar.gz
MS-Windows followup for 2013-07-07T18:00:14Z!eggert@cs.ucla.edu.
nt/inc/sys/socket.h (F_SETFD, O_CLOEXEC, F_DUPFD_CLOEXEC) (FD_CLOEXEC): New macros. src/w32.c (sys_dup): Declare prototype. src/filelock.c: src/emacs.c: src/callproc.c [WINDOWSNT]: Include sys/socket.h.
Diffstat (limited to 'nt')
-rw-r--r--nt/ChangeLog5
-rw-r--r--nt/inc/sys/socket.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index a9b4f836644..c0598dd5630 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-07 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/sys/socket.h (F_SETFD, O_CLOEXEC, F_DUPFD_CLOEXEC)
+ (FD_CLOEXEC): New macros.
+
2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
Make file descriptors close-on-exec when possible (Bug#14803).
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h
index 99227d75d28..93bf9f91665 100644
--- a/nt/inc/sys/socket.h
+++ b/nt/inc/sys/socket.h
@@ -123,7 +123,11 @@ int sys_sendto (int s, const char * buf, int len, int flags,
an fcntl function, for setting sockets to non-blocking mode. */
int fcntl (int s, int cmd, int options);
#define F_SETFL 4
+#define F_SETFD 2
#define O_NONBLOCK 04000
+#define O_CLOEXEC O_NOINHERIT
+#define F_DUPFD_CLOEXEC 0x40000000
+#define FD_CLOEXEC 1
/* we are providing a real h_errno variable */
#undef h_errno