diff -u -r original/trunk/Lib/socket.py trunk/Lib/socket.py --- original/trunk/Lib/socket.py 2008-02-11 11:59:02.018827900 +0100 +++ trunk/Lib/socket.py 2008-02-11 14:09:58.533531300 +0100 @@ -143,7 +143,7 @@ 'sendall', 'setblocking', 'settimeout', 'gettimeout', 'shutdown') -if os.name == "nt": +if os.name == "nt" and hasattr(_socket.socket, 'ioctl'): _socketmethods = _socketmethods + ('ioctl',) if sys.platform == "riscos": diff -u -r original/trunk/Modules/posixmodule.c trunk/Modules/posixmodule.c --- original/trunk/Modules/posixmodule.c 2008-02-11 11:58:56.818133800 +0100 +++ trunk/Modules/posixmodule.c 2008-02-11 11:24:58.004666200 +0100 @@ -269,6 +269,9 @@ #include #endif #include "osdefs.h" +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0400 /* Needed for CryptoAPI on some systems */ +#endif #include #include /* for ShellExecute() */ #define popen _popen diff -u -r original/trunk/Modules/socketmodule.c trunk/Modules/socketmodule.c --- original/trunk/Modules/socketmodule.c 2008-02-11 11:58:56.927457700 +0100 +++ trunk/Modules/socketmodule.c 2008-02-11 13:51:32.829552800 +0100 @@ -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 @@ -5235,7 +5235,11 @@ PyModule_AddIntConstant(m, "RCVALL_OFF", RCVALL_OFF); PyModule_AddIntConstant(m, "RCVALL_ON", RCVALL_ON); PyModule_AddIntConstant(m, "RCVALL_SOCKETLEVELONLY", RCVALL_SOCKETLEVELONLY); +#endif +#ifdef RCVALL_IPLEVEL PyModule_AddIntConstant(m, "RCVALL_IPLEVEL", RCVALL_IPLEVEL); +#endif +#ifdef RCVALL_MAX PyModule_AddIntConstant(m, "RCVALL_MAX", RCVALL_MAX); #endif /* _MSTCPIP_ */ diff -u -r original/trunk/PC/VC6/python.dsp trunk/PC/VC6/python.dsp --- original/trunk/PC/VC6/python.dsp 2008-02-11 14:19:02.197982500 +0100 +++ trunk/PC/VC6/python.dsp 2008-02-11 14:16:03.027400700 +0100 @@ -75,7 +75,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1d000000" /subsystem:console /debug /machine:I386 /out:"./python_d.exe" /pdbtype:sept +# ADD LINK32 odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1d000000" /stack:0x1e8480 /subsystem:console /debug /machine:I386 /out:"./python_d.exe" /pdbtype:sept # SUBTRACT LINK32 /pdb:none !ENDIF diff -u -r original/trunk/PC/VC6/pythoncore.dsp trunk/PC/VC6/pythoncore.dsp --- original/trunk/PC/VC6/pythoncore.dsp 2008-02-11 14:19:15.193882500 +0100 +++ trunk/PC/VC6/pythoncore.dsp 2008-02-11 14:16:03.058641700 +0100 @@ -125,6 +125,10 @@ # End Source File # Begin Source File +SOURCE=..\..\Modules\_collectionsmodule.c +# End Source File +# Begin Source File + SOURCE=..\..\Modules\_csv.c # End Source File # Begin Source File @@ -253,10 +257,6 @@ # End Source File # Begin Source File -SOURCE=..\..\Modules\collectionsmodule.c -# End Source File -# Begin Source File - SOURCE=..\..\Python\compile.c # End Source File # Begin Source File @@ -583,10 +583,6 @@ # End Source File # Begin Source File -SOURCE=..\..\Modules\rgbimgmodule.c -# End Source File -# Begin Source File - SOURCE=..\..\Modules\rotatingtree.c # End Source File # Begin Source File diff -u -r original/trunk/PC/msvcrtmodule.c trunk/PC/msvcrtmodule.c --- original/trunk/PC/msvcrtmodule.c 2008-02-11 11:58:53.475939600 +0100 +++ trunk/PC/msvcrtmodule.c 2008-02-11 11:37:39.233867800 +0100 @@ -143,6 +143,7 @@ return PyString_FromStringAndSize(s, 1); } +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_getwch(PyObject *self, PyObject *args) { @@ -158,6 +159,7 @@ u[0] = ch; return PyUnicode_FromUnicode(u, 1); } +#endif static PyObject * msvcrt_getche(PyObject *self, PyObject *args) @@ -175,6 +177,7 @@ return PyString_FromStringAndSize(s, 1); } +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_getwche(PyObject *self, PyObject *args) { @@ -190,6 +193,7 @@ s[0] = ch; return PyUnicode_FromUnicode(s, 1); } +#endif static PyObject * msvcrt_putch(PyObject *self, PyObject *args) @@ -205,6 +209,7 @@ } +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_putwch(PyObject *self, PyObject *args) { @@ -223,6 +228,7 @@ Py_RETURN_NONE; } +#endif static PyObject * msvcrt_ungetch(PyObject *self, PyObject *args) @@ -238,6 +244,7 @@ return Py_None; } +#ifdef _WCONIO_DEFINED static PyObject * msvcrt_ungetwch(PyObject *self, PyObject *args) { @@ -251,6 +258,7 @@ Py_INCREF(Py_None); return Py_None; } +#endif static void insertint(PyObject *d, char *name, int value) @@ -279,11 +287,12 @@ {"getche", msvcrt_getche, METH_VARARGS}, {"putch", msvcrt_putch, METH_VARARGS}, {"ungetch", msvcrt_ungetch, METH_VARARGS}, +#ifdef _WCONIO_DEFINED {"getwch", msvcrt_getwch, METH_VARARGS}, {"getwche", msvcrt_getwche, METH_VARARGS}, {"putwch", msvcrt_putwch, METH_VARARGS}, {"ungetwch", msvcrt_ungetwch, METH_VARARGS}, - +#endif {NULL, NULL} }; diff -u -r original/trunk/PC/pyconfig.h trunk/PC/pyconfig.h --- original/trunk/PC/pyconfig.h 2008-02-11 11:58:53.491557300 +0100 +++ trunk/PC/pyconfig.h 2008-02-11 13:58:26.997619900 +0100 @@ -161,9 +161,13 @@ #define Py_WINVER _WIN32_WINNT_WINXP #define Py_NTDDI NTDDI_WINXP #else +#if _MSC_VER >= 1300 /* Python 2.6+ requires Windows 2000 or greater */ -#define Py_WINVER _WIN32_WINNT_WIN2K +#define Py_WINVER 0x500 #define Py_NTDDI NTDDI_WIN2KSP4 +#else +#define Py_WINVER 0x400 +#endif #endif /* We only set these values when building Python - we don't want to force @@ -180,10 +184,12 @@ #ifndef WINVER #define WINVER Py_WINVER #endif +#if defined(_MSC_VER) && _MSC_VER >= 1300 #ifndef _WIN32_WINNT #define _WIN32_WINNT Py_WINVER #endif #endif +#endif /* _W64 is not defined for VC6 or eVC4 */ #ifndef _W64 @@ -222,6 +228,15 @@ #include #endif +#ifndef _INTPTR_T_DEFINED +#ifdef _WIN64 +typedef __int64 intptr_t; +#else +typedef _W64 int intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + /* ------------------------------------------------------------------------*/ /* The Borland compiler defines __BORLANDC__ */ /* XXX These defines are likely incomplete, but should be easy to fix. */