Skip to content

Commit

Permalink
test for _MSC_VER before using MSVC specific code
Browse files Browse the repository at this point in the history
  • Loading branch information
pijyoi authored and hintjens committed Oct 5, 2013
1 parent b20573c commit 5493d4d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/testutil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
#include <string>

#if defined _WIN32
# include <crtdbg.h>
# pragma warning(disable:4996)
# if defined _MSC_VER
# include <crtdbg.h>
# pragma warning(disable:4996)
# endif
#else
# include <unistd.h>
# include <signal.h>
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 5493d4d

Please sign in to comment.