]> code.delx.au - gnu-emacs/commitdiff
MS-Windows followup for 2013-07-07T18:00:14Z!eggert@cs.ucla.edu.
authorEli Zaretskii <eliz@gnu.org>
Sun, 7 Jul 2013 18:48:16 +0000 (21:48 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 7 Jul 2013 18:48:16 +0000 (21:48 +0300)
 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.

nt/ChangeLog
nt/inc/sys/socket.h
src/ChangeLog
src/callproc.c
src/emacs.c
src/filelock.c
src/w32.c

index a9b4f83664478d554b2383bf5884e57c44620f0c..c0598dd563041be772ab1af442cae3dcec68f20f 100644 (file)
@@ -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).
index 99227d75d2822b4cffd46ca0a55a6d9fd07539aa..93bf9f9166559e5bcea59ee77b79109e9d8c8629 100644 (file)
@@ -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
index 07285d564b2ea7405807ad5e92f0aab9ccf7d1df..9eb7b5b862a1d5f8846dec6054e93678701ef6d5 100644 (file)
@@ -1,3 +1,11 @@
+2013-07-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32.c (sys_dup): Declare prototype.
+
+       * filelock.c:
+       * emacs.c:
+       * callproc.c [WINDOWSNT]: Include sys/socket.h.
+
 2013-07-07  Paul Eggert  <eggert@cs.ucla.edu>
 
        Make file descriptors close-on-exec when possible (Bug#14803).
index 3e70b1c2e499e3a5014c18a553afa66d31210e06..369d6eda9096703f45f3e2df1fdae120c5561cff 100644 (file)
@@ -31,6 +31,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifdef WINDOWSNT
 #define NOMINMAX
+#include <sys/socket.h>        /* for fcntl */
 #include <windows.h>
 #include "w32.h"
 #define _P_NOWAIT 1    /* from process.h */
index e4412e2ea1a7b66fdd4023d6d71b902264d346c7..edf98d8cdb5fd5cdd55758874a247efc50d5a406 100644 (file)
@@ -34,6 +34,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifdef WINDOWSNT
 #include <fcntl.h>
+#include <sys/socket.h>
 #include "w32.h"
 #include "w32heap.h"
 #endif
index 1fcd2432484e4c39130e6e141a5a7323be0b77dd..6e939f271d72ba3aab7969717ffc23e03e46d548 100644 (file)
@@ -47,6 +47,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "systime.h"
 #ifdef WINDOWSNT
 #include <share.h>
+#include <sys/socket.h>        /* for fcntl */
 #include "w32.h"       /* for dostounix_filename */
 #endif
 
index 46aebe8b634fff421d7355567f94057e6c47990e..1a3d81bbffc036855fe4a0dc5ba221a83d92cf72 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -234,6 +234,8 @@ extern int sys_access (const char *, int);
 extern void *e_malloc (size_t);
 extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
                       EMACS_TIME *, void *);
+extern int sys_dup (int);
+
 
 
 \f