From 64dbf56d6ef17e0bc6bb1a193f70bf9252638b82 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Mon, 22 Aug 2016 20:57:01 +0200 Subject: [PATCH 1/2] testutil.hpp: Fix include path to windows.hpp --- tests/testutil.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutil.hpp b/tests/testutil.hpp index bbb24fc8..2b352054 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -47,7 +47,7 @@ #include #if defined _WIN32 -# include "windows.hpp" +# include "../src/windows.hpp" # if defined _MSC_VER # include # pragma warning(disable:4996) From b86717dc9a5d83e05644b9e301f60746483a8897 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Mon, 22 Aug 2016 20:57:28 +0200 Subject: [PATCH 2/2] Tests: Fix compilation on Windows Visual Studio 2015 does grok the preprocessor defintion. Add an explicit call to defined as done in other places. --- tests/test_security_curve.cpp | 2 +- tests/test_security_null.cpp | 2 +- tests/test_security_plain.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_security_curve.cpp b/tests/test_security_curve.cpp index ebfb9538..7d317b8b 100644 --- a/tests/test_security_curve.cpp +++ b/tests/test_security_curve.cpp @@ -245,7 +245,7 @@ int main (void) ip4addr.sin_family = AF_INET; ip4addr.sin_port = htons (9998); -#if (ZMQ_HAVE_WINDOWS and _WIN32_WINNT < 0x0600) +#if defined(ZMQ_HAVE_WINDOWS) && _WIN32_WINNT < 0x0600 ip4addr.sin_addr.s_addr = inet_addr ("127.0.0.1"); #else inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); diff --git a/tests/test_security_null.cpp b/tests/test_security_null.cpp index f0ce6b55..c4ae5c5f 100644 --- a/tests/test_security_null.cpp +++ b/tests/test_security_null.cpp @@ -158,7 +158,7 @@ int main (void) ip4addr.sin_family = AF_INET; ip4addr.sin_port = htons(9003); -#if (ZMQ_HAVE_WINDOWS and _WIN32_WINNT < 0x0600) +#if defined(ZMQ_HAVE_WINDOWS) && _WIN32_WINNT < 0x0600 ip4addr.sin_addr.s_addr = inet_addr ("127.0.0.1"); #else inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr); diff --git a/tests/test_security_plain.cpp b/tests/test_security_plain.cpp index bfa0b7ed..8d166410 100644 --- a/tests/test_security_plain.cpp +++ b/tests/test_security_plain.cpp @@ -164,7 +164,7 @@ int main (void) ip4addr.sin_family = AF_INET; ip4addr.sin_port = htons (9998); -#if (ZMQ_HAVE_WINDOWS and _WIN32_WINNT < 0x0600) +#if defined(ZMQ_HAVE_WINDOWS) && _WIN32_WINNT < 0x0600 ip4addr.sin_addr.s_addr = inet_addr ("127.0.0.1"); #else inet_pton(AF_INET, "127.0.0.1", &ip4addr.sin_addr);