From 79e92babf5a6e028a8337696c68b6982713b722a Mon Sep 17 00:00:00 2001
From: Graham Madarasz <graham@lindenlab.com>
Date: Mon, 3 Jun 2013 18:35:54 -0700
Subject: [PATCH] BUG-2707 and not break use of venerable ifdefs

---
 indra/llui/llxuiparser.cpp | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp
index 2f0e50fdaf3..660af973479 100755
--- a/indra/llui/llxuiparser.cpp
+++ b/indra/llui/llxuiparser.cpp
@@ -1308,11 +1308,13 @@ bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t
 
 void LLXUIParser::parserWarning(const std::string& message)
 {
-#ifdef LL_WINDOWS && BUG_2707_HUNT
+#ifdef LL_WINDOWS
+#if BUG_2707_HUNT
 	// use Visual Studo friendly formatting of output message for easy access to originating xml
 	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()).c_str());
 	utf16str += '\n';
 	OutputDebugString(utf16str.c_str());
+#endif
 #else
 	Parser::parserWarning(message);
 #endif
@@ -1320,10 +1322,12 @@ void LLXUIParser::parserWarning(const std::string& message)
 
 void LLXUIParser::parserError(const std::string& message)
 {
-#ifdef LL_WINDOWS && BUG_2707_HUNT
+#ifdef LL_WINDOWS
+#if BUG_2707_HUNT
 	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()).c_str());
 	utf16str += '\n';
 	OutputDebugString(utf16str.c_str());
+#endif
 #else
 	Parser::parserError(message);
 #endif
@@ -1639,11 +1643,13 @@ bool LLSimpleXUIParser::processText()
 
 void LLSimpleXUIParser::parserWarning(const std::string& message)
 {
-#ifdef LL_WINDOWS && BUG_2707_HUNT
+#ifdef LL_WINDOWS
+#if BUG_2707_HUNT
 	// use Visual Studo friendly formatting of output message for easy access to originating xml
 	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()).c_str());
 	utf16str += '\n';
 	OutputDebugString(utf16str.c_str());
+#endif
 #else
 	Parser::parserWarning(message);
 #endif
@@ -1651,10 +1657,12 @@ void LLSimpleXUIParser::parserWarning(const std::string& message)
 
 void LLSimpleXUIParser::parserError(const std::string& message)
 {
-#ifdef LL_WINDOWS && BUG_2707_HUNT
+#ifdef LL_WINDOWS
+#if BUG_2707_HUNT
 	llutf16string utf16str = utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()).c_str());
 	utf16str += '\n';
 	OutputDebugString(utf16str.c_str());
+#endif
 #else
 	Parser::parserError(message);
 #endif
-- 
GitLab