From 79c2598a0817403c2b5bcef74cb96ecab798cc85 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 5 Oct 2013 00:48:52 +0800 Subject: [PATCH 1/2] test for _MSC_VER before using MSVC specific code --- tests/testutil.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/testutil.hpp b/tests/testutil.hpp index 74c75178..6a9fb1a4 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -31,8 +31,10 @@ #include #if defined _WIN32 -# include -# pragma warning(disable:4996) +# if defined _MSC_VER +# include +# pragma warning(disable:4996) +# endif #else # include # include @@ -249,9 +251,11 @@ void close_zero_linger (void *socket) void setup_test_environment() { #if defined _WIN32 +# if defined _MSC_VER _set_abort_behavior( 0, _WRITE_ABORT_MSG); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); +# endif #endif } From 55bfe7dbabad89330cd8d67f48a16d4e41a39baf Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 5 Oct 2013 00:51:47 +0800 Subject: [PATCH 2/2] WinSock2.h filename should be all lowercase --- tests/test_system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_system.cpp b/tests/test_system.cpp index e8dab5cc..bbea6541 100644 --- a/tests/test_system.cpp +++ b/tests/test_system.cpp @@ -20,7 +20,7 @@ #include "testutil.hpp" #if defined (ZMQ_HAVE_WINDOWS) -# include +# include # include #else # include