summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-06-13 00:42:22 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-06-13 00:42:22 (GMT)
commita4dd2e20e2302cc41a027cae5d0057dc2dff2ba6 (patch)
treec70e9c1bfc706b80cdd7e9343a13e41136ac99ef /Modules/socketmodule.c
parent114f7e5ffff86daef0a9e9802317e7b259c447f9 (diff)
downloadcpython-a4dd2e20e2302cc41a027cae5d0057dc2dff2ba6.zip
cpython-a4dd2e20e2302cc41a027cae5d0057dc2dff2ba6.tar.gz
cpython-a4dd2e20e2302cc41a027cae5d0057dc2dff2ba6.tar.bz2
Restore support for Microsoft VC6 compiler.
Some functions in the msvcrt module are skipped, and socket.ioctl is enabled only when using a more recent Platform SDK. (and yes, there are still companies that use a 10-years old compiler)
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index e956831..e4c8ac8 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -2805,7 +2805,7 @@ PyDoc_STRVAR(shutdown_doc,
Shut down the reading side of the socket (flag == SHUT_RD), the writing side\n\
of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).");
-#ifdef MS_WINDOWS
+#if defined(MS_WINDOWS) && defined(SIO_RCVALL)
static PyObject*
sock_ioctl(PySocketSockObject *s, PyObject *arg)
{
@@ -2858,7 +2858,7 @@ static PyMethodDef sock_methods[] = {
METH_NOARGS, getsockname_doc},
{"getsockopt", (PyCFunction)sock_getsockopt, METH_VARARGS,
getsockopt_doc},
-#ifdef MS_WINDOWS
+#if defined(MS_WINDOWS) && defined(SIO_RCVALL)
{"ioctl", (PyCFunction)sock_ioctl, METH_VARARGS,
sock_ioctl_doc},
#endif