From 5eb354b338bb8d8fcd35b6ac3fb33f8103e757c3 Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Thu, 20 Oct 2011 18:42:46 +0000 Subject: Merge trunk to QPID-2519 branch git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/QPID-2519@1186990 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/windows/DisableWin32ErrorWindows.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpp/src/tests/windows/DisableWin32ErrorWindows.cpp') diff --git a/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp b/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp index a0b665db73..024f20b147 100644 --- a/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp +++ b/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp @@ -26,7 +26,9 @@ // include this file with the executable being built. If the default // behaviors are desired, don't include this file in the build. +#if defined(_MSC_VER) #include +#endif #include #include @@ -53,12 +55,14 @@ static redirect_errors_to_stderr block; redirect_errors_to_stderr::redirect_errors_to_stderr() { +#if defined(_MSC_VER) _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile (_CRT_WARN, _CRTDBG_FILE_STDERR); _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_FILE); _CrtSetReportFile (_CRT_ERROR, _CRTDBG_FILE_STDERR); _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_FILE); _CrtSetReportFile (_CRT_ASSERT, _CRTDBG_FILE_STDERR); +#endif // Prevent the system from displaying the critical-error-handler // and can't-open-file message boxes. -- cgit v1.2.1