From 30f1d0fe79d45c8d89a654faf00431366d75ba84 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 28 Sep 2017 14:07:32 -0700 Subject: Specify min windows version as Vista for Python --- include/grpc/impl/codegen/port_platform.h | 4 ---- setup.py | 4 +--- src/core/lib/iomgr/socket_utils_windows.c | 4 ---- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 7e5f85253e..0f4316c954 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -291,10 +291,6 @@ #endif #ifdef _MSC_VER -#ifdef _PYTHON_MSVC -// The Python 3.5 Windows runtime is missing InetNtop -#define GPR_WIN_INET_NTOP -#endif // _PYTHON_MSVC #if _MSC_VER < 1700 typedef __int8 int8_t; typedef __int16 int16_t; diff --git a/setup.py b/setup.py index 12882413ce..90c9316b0d 100644 --- a/setup.py +++ b/setup.py @@ -110,8 +110,6 @@ if EXTRA_ENV_COMPILE_ARGS is None: EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime32 -D_timeb=__timeb32 -D_ftime_s=_ftime32_s' else: EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64' - elif 'win32' in sys.platform: - EXTRA_ENV_COMPILE_ARGS += ' -D_PYTHON_MSVC' elif "linux" in sys.platform: EXTRA_ENV_COMPILE_ARGS += ' -std=c++11 -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions' elif "darwin" in sys.platform: @@ -163,7 +161,7 @@ if "win32" in sys.platform: # TODO(zyc): Re-enble c-ares on x64 and x86 windows after fixing the # ares_library_init compilation issue DEFINE_MACROS += (('WIN32_LEAN_AND_MEAN', 1), ('CARES_STATICLIB', 1), - ('GRPC_ARES', 0),) + ('GRPC_ARES', 0), ('NTDDI_VERSION', 0x06000000),) if '64bit' in platform.architecture()[0]: DEFINE_MACROS += (('MS_WIN64', 1),) elif sys.version_info >= (3, 5): diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index 2732c159aa..6e85e4b61f 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -26,12 +26,8 @@ #include const char *grpc_inet_ntop(int af, const void *src, char *dst, size_t size) { -#ifdef GPR_WIN_INET_NTOP - return inet_ntop(af, src, dst, size); -#else /* Windows InetNtopA wants a mutable ip pointer */ return InetNtopA(af, (void *)src, dst, size); -#endif /* GPR_WIN_INET_NTOP */ } #endif /* GRPC_WINDOWS_SOCKETUTILS */ -- cgit v1.2.3