aboutsummaryrefslogtreecommitdiff
path: root/X11
diff options
context:
space:
mode:
Diffstat (limited to 'X11')
-rw-r--r--X11/xtrans/Xtransint.h2
-rwxr-xr-x[-rw-r--r--]X11/xtrans/Xtranssock.c43
2 files changed, 25 insertions, 20 deletions
diff --git a/X11/xtrans/Xtransint.h b/X11/xtrans/Xtransint.h
index fcfb3b299..f93f98fa4 100644
--- a/X11/xtrans/Xtransint.h
+++ b/X11/xtrans/Xtransint.h
@@ -72,7 +72,9 @@ from The Open Group.
# define XTRANSDEBUG 1
#endif
+#ifndef _MSC_VER
#define XTRANS_SEND_FDS 1
+#endif
#ifdef WIN32
# define _WILLWINSOCK_
diff --git a/X11/xtrans/Xtranssock.c b/X11/xtrans/Xtranssock.c
index b3a2843e4..adae5769c 100644..100755
--- a/X11/xtrans/Xtranssock.c
+++ b/X11/xtrans/Xtranssock.c
@@ -257,6 +257,9 @@ static int TRANS(SocketINETClose) (XtransConnInfo ciptr);
# define SOCKLEN_T int
#endif
+static int TRANS(SocketRecvFdInvalid)(XtransConnInfo ciptr);
+static int TRANS(SocketSendFdInvalid)(XtransConnInfo ciptr, int fd, int do_close);
+
/*
* These are some utility function used by the real interface function below.
*/
@@ -2197,20 +2200,6 @@ TRANS(SocketSendFd) (XtransConnInfo ciptr, int fd, int do_close)
return 0;
}
-static int
-TRANS(SocketRecvFdInvalid)(XtransConnInfo ciptr)
-{
- errno = EINVAL;
- return -1;
-}
-
-static int
-TRANS(SocketSendFdInvalid)(XtransConnInfo ciptr, int fd, int do_close)
-{
- errno = EINVAL;
- return -1;
-}
-
#define MAX_FDS 128
struct fd_pass {
@@ -2237,6 +2226,20 @@ static inline void init_msg_send(struct msghdr *msg, struct iovec *iov, int niov
#endif /* XTRANS_SEND_FDS */
static int
+TRANS(SocketRecvFdInvalid)(XtransConnInfo ciptr)
+{
+ errno = EINVAL;
+ return -1;
+}
+
+static int
+TRANS(SocketSendFdInvalid)(XtransConnInfo ciptr, int fd, int do_close)
+{
+ errno = EINVAL;
+ return -1;
+}
+
+static int
TRANS(SocketRead) (XtransConnInfo ciptr, char *buf, int size)
{
@@ -2498,8 +2501,8 @@ Xtransport TRANS(SocketTCPFuncs) = {
TRANS(SocketWrite),
TRANS(SocketReadv),
TRANS(SocketWritev),
- TRANS(SocketSendFdInvalid),
- TRANS(SocketRecvFdInvalid),
+ TRANS(SocketSendFdInvalid),
+ TRANS(SocketRecvFdInvalid),
TRANS(SocketDisconnect),
TRANS(SocketINETClose),
TRANS(SocketINETClose),
@@ -2540,8 +2543,8 @@ Xtransport TRANS(SocketINETFuncs) = {
TRANS(SocketWrite),
TRANS(SocketReadv),
TRANS(SocketWritev),
- TRANS(SocketSendFdInvalid),
- TRANS(SocketRecvFdInvalid),
+ TRANS(SocketSendFdInvalid),
+ TRANS(SocketRecvFdInvalid),
TRANS(SocketDisconnect),
TRANS(SocketINETClose),
TRANS(SocketINETClose),
@@ -2583,8 +2586,8 @@ Xtransport TRANS(SocketINET6Funcs) = {
TRANS(SocketWrite),
TRANS(SocketReadv),
TRANS(SocketWritev),
- TRANS(SocketSendFdInvalid),
- TRANS(SocketRecvFdInvalid),
+ TRANS(SocketSendFdInvalid),
+ TRANS(SocketRecvFdInvalid),
TRANS(SocketDisconnect),
TRANS(SocketINETClose),
TRANS(SocketINETClose),