From 5208751a8c078f374f2dda76379825189985fc37 Mon Sep 17 00:00:00 2001 From: jwellbelove Date: Wed, 13 Jan 2016 13:53:28 +0000 Subject: [PATCH] Added compiler #if to exclude Windows header for Linux platforms. --- test/test_error_handler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test_error_handler.cpp b/test/test_error_handler.cpp index a7c6549c..f75a51f0 100644 --- a/test/test_error_handler.cpp +++ b/test/test_error_handler.cpp @@ -27,7 +27,9 @@ SOFTWARE. ******************************************************************************/ #include +#if defined(PLATFORM_WINDOWS) #include +#endif #include #include @@ -59,6 +61,7 @@ void receive_error(const etl::exception& e) std::ostringstream oss; oss << "Error '" << e.what() << "' in " << e.file_name() << " at line " << e.line_number() << "\n"; +#if defined(PLATFORM_WINDOWS) std::string stext = oss.str(); WCHAR text[200]; @@ -66,6 +69,7 @@ void receive_error(const etl::exception& e) LPCWSTR ltext = text; OutputDebugString(ltext); +#endif } //***************************************************************************** @@ -82,6 +86,7 @@ public: std::ostringstream oss; oss << "Error '" << e.what() << "' in " << e.file_name() << " at line " << e.line_number() << "\n"; +#if defined(PLATFORM_WINDOWS) std::string stext = oss.str(); WCHAR text[200]; @@ -89,11 +94,12 @@ public: LPCWSTR ltext = text; OutputDebugString(ltext); +#endif } }; namespace -{ +{ SUITE(test_error_handler) { //*************************************************************************