summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-02 12:28:07 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-04-02 12:28:07 +0200
commit84ae3848dc4d7709548724ef2ce362eec92bcf26 (patch)
tree998e66dfa1dbc035ce76080c2240ecc5e08e668d /Modules/socketmodule.c
parent0e8daec99bef2d2768ef656d7c22e2be3bdfa958 (diff)
downloadcpython-84ae3848dc4d7709548724ef2ce362eec92bcf26.tar.gz
Issue #23618: Don't declare recvmsg/sendmsg helper functions on Windows
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 968c2df165..60891b8fec 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3109,6 +3109,9 @@ PyDoc_STRVAR(recvfrom_into_doc,
\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 @@ sock_recvmsg_impl(PySocketSockObject *s, void *data)
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 @@ Like send(data, flags) but allows specifying the destination address.\n\
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 @@ sock_sendmsg_impl(PySocketSockObject *s, void *data)
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 *