[Python-checkins] cpython: Issue #23618: Don't declare recvmsg/sendmsg helper functions on Windows

victor.stinner python-checkins at python.org
Thu Apr 2 12:57:52 CEST 2015


https://hg.python.org/cpython/rev/aad52bfc816f
changeset: 95375:aad52bfc816f
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Apr 02 12:28:07 2015 +0200
summary:
 Issue #23618: Don't declare recvmsg/sendmsg helper functions on Windows
files:
 Modules/socketmodule.c | 13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3109,6 +3109,9 @@
 \n\
 Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info.");
 
+/* The sendmsg() and recvmsg[_into]() methods require a working
+ CMSG_LEN(). See the comment near get_CMSG_LEN(). */
+#ifdef CMSG_LEN
 struct sock_recvmsg {
 struct msghdr *msg;
 int flags;
@@ -3124,10 +3127,6 @@
 return (ctx->result >= 0);
 }
 
-
-/* The sendmsg() and recvmsg[_into]() methods require a working
- CMSG_LEN(). See the comment near get_CMSG_LEN(). */
-#ifdef CMSG_LEN
 /*
 * Call recvmsg() with the supplied iovec structures, flags, and
 * ancillary data buffer size (controllen). Returns the tuple return
@@ -3641,6 +3640,9 @@
 For IP sockets, the address is a pair (hostaddr, port).");
 
 
+/* The sendmsg() and recvmsg[_into]() methods require a working
+ CMSG_LEN(). See the comment near get_CMSG_LEN(). */
+#ifdef CMSG_LEN
 struct sock_sendmsg {
 struct msghdr *msg;
 int flags;
@@ -3656,9 +3658,6 @@
 return (ctx->result >= 0);
 }
 
-/* The sendmsg() and recvmsg[_into]() methods require a working
- CMSG_LEN(). See the comment near get_CMSG_LEN(). */
-#ifdef CMSG_LEN
 /* s.sendmsg(buffers[, ancdata[, flags[, address]]]) method */
 
 static PyObject *
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /