diff Modules/socketmodule.c @ 47666:fcfe10f3dc14 legacy-trunk

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)
author Amaury Forgeot d'Arc <amauryfa@gmail.com>
date Fri, 13 Jun 2008 00:42:22 +0000
parents 52294af4b663
children b8c4bf393794
line wrap: on
line diff
--- a/Modules/socketmodule.c	Fri Jun 13 00:09:47 2008 +0000
+++ b/Modules/socketmodule.c	Fri Jun 13 00:42:22 2008 +0000
@@ -2805,7 +2805,7 @@
 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 @@
 			  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