From 3e96f324dcdbeb78fcd8fa4ffe2cd0c67f3828b2 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Mon, 2 Mar 2015 08:01:10 -0800 Subject: Issue #23451: Update pyconfig.h for Windows to require Vista headers and remove unnecessary version checks. --- Modules/_winapi.c | 8 ++++++++ Modules/socketmodule.h | 7 +++++++ 2 files changed, 15 insertions(+) (limited to 'Modules') diff --git a/Modules/_winapi.c b/Modules/_winapi.c index 51c4d5f45c..0274874dda 100644 --- a/Modules/_winapi.c +++ b/Modules/_winapi.c @@ -1001,6 +1001,12 @@ PyDoc_STRVAR(GetVersion_doc, \n\ Return the version number of the current operating system."); +/* Disable deprecation warnings about GetVersionEx as the result is + being passed straight through to the caller, who is responsible for + using it correctly. */ +#pragma warning(push) +#pragma warning(disable:4996) + static PyObject * winapi_GetVersion(PyObject* self, PyObject* args) { @@ -1010,6 +1016,8 @@ winapi_GetVersion(PyObject* self, PyObject* args) return PyLong_FromUnsignedLong(GetVersion()); } +#pragma warning(pop) + static PyObject * winapi_OpenProcess(PyObject *self, PyObject *args) { diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h index b83f9af3bd..4b6a10e85a 100644 --- a/Modules/socketmodule.h +++ b/Modules/socketmodule.h @@ -14,6 +14,13 @@ #else /* MS_WINDOWS */ # include +/* Windows 'supports' CMSG_LEN, but does not follow the POSIX standard + * interface at all, so there is no point including the code that + * attempts to use it. + */ +# ifdef PySocket_BUILDING_SOCKET +# undef CMSG_LEN +# endif # include /* VC6 is shipped with old platform headers, and does not have MSTcpIP.h * Separate SDKs have all the functions we want, but older ones don't have -- cgit v1.2.1