From 783296cc2e30dcee20186bc1554bea6105b32b4a Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Apr 2021 00:05:56 -0400
Subject: [PATCH] Fix SHOW_DEBUG macro checks to not throw warnings under clang

---
 indra/llappearance/llavatarappearance.cpp |  4 +-
 indra/llappearance/llavatarjointmesh.cpp  | 12 ++---
 indra/llcharacter/lljoint.cpp             | 20 ++++----
 indra/llcharacter/lljointsolverrp3.cpp    | 10 ++--
 indra/llcommon/lleventcoro.cpp            | 14 +++---
 indra/llcommon/llprocess.cpp              |  2 +-
 indra/llcorehttp/_httppolicy.cpp          |  6 +--
 indra/llfilesystem/lldir.cpp              | 10 ++--
 indra/llimagej2coj/llimagej2coj.cpp       |  2 +-
 indra/llmessage/llavatarname.cpp          |  2 +-
 indra/llmessage/llavatarnamecache.cpp     |  8 ++--
 indra/llplugin/llpluginclassmedia.cpp     |  2 +-
 indra/llplugin/llpluginmessagepipe.cpp    |  6 +--
 indra/llplugin/llpluginprocessparent.cpp  |  6 +--
 indra/llprimitive/llprimitive.cpp         |  2 +-
 indra/llrender/llrender.cpp               |  2 +-
 indra/llui/llbutton.cpp                   |  2 +-
 indra/llui/lldraghandle.cpp               |  4 +-
 indra/llui/lllineeditor.cpp               |  4 +-
 indra/llui/llmenugl.cpp                   |  2 +-
 indra/llui/llmodaldialog.cpp              |  2 +-
 indra/llui/llmultislider.cpp              |  4 +-
 indra/llui/llnotifications.cpp            | 10 ++--
 indra/llui/llscrollbar.cpp                |  4 +-
 indra/llui/llslider.cpp                   |  4 +-
 indra/llui/lltextbase.cpp                 |  2 +-
 indra/llui/lltexteditor.cpp               |  2 +-
 indra/llui/lluictrl.cpp                   |  8 ++--
 indra/llui/llview.cpp                     |  6 +--
 indra/llwindow/llkeyboard.cpp             |  2 +-
 indra/newview/alaoengine.cpp              | 46 +++++++++----------
 indra/newview/llaisapi.cpp                |  2 +-
 indra/newview/llcallingcard.cpp           |  2 +-
 indra/newview/llcontrolavatar.cpp         |  8 ++--
 indra/newview/lldrawpoolwlsky.cpp         |  4 +-
 indra/newview/llfavoritesbar.cpp          |  6 +--
 indra/newview/llfriendcard.cpp            | 10 ++--
 indra/newview/llinventorymodel.cpp        |  6 +--
 indra/newview/llmanip.cpp                 |  4 +-
 indra/newview/llmaniprotate.cpp           |  4 +-
 indra/newview/llmanipscale.cpp            |  4 +-
 indra/newview/llmaniptranslate.cpp        | 10 ++--
 indra/newview/llmaterialmgr.cpp           | 10 ++--
 indra/newview/llmediadataclient.cpp       | 38 +++++++--------
 indra/newview/llpanelland.cpp             |  2 +-
 indra/newview/llspatialpartition.cpp      |  4 +-
 indra/newview/lltexturefetch.cpp          | 54 +++++++++++-----------
 indra/newview/lltool.cpp                  |  2 +-
 indra/newview/lltoolbrush.cpp             |  2 +-
 indra/newview/lltooldraganddrop.cpp       |  2 +-
 indra/newview/lltoolfocus.cpp             |  8 ++--
 indra/newview/lltoolgrab.cpp              | 10 ++--
 indra/newview/lltoolgun.cpp               |  6 +--
 indra/newview/lltoolpie.cpp               | 10 ++--
 indra/newview/lltoolplacer.cpp            |  2 +-
 indra/newview/lltoolselectland.cpp        |  8 ++--
 indra/newview/lltoolselectrect.cpp        |  4 +-
 indra/newview/llviewerassetstorage.cpp    | 12 ++---
 indra/newview/llviewerinventory.cpp       |  4 +-
 indra/newview/llviewermedia.cpp           |  6 +--
 indra/newview/llviewermessage.cpp         | 20 ++++----
 indra/newview/llviewerobject.cpp          | 20 ++++----
 indra/newview/llviewerobjectlist.cpp      | 30 ++++++------
 indra/newview/llviewerregion.cpp          |  8 ++--
 indra/newview/llviewertexture.cpp         |  2 +-
 indra/newview/llviewertexturelist.cpp     | 10 ++--
 indra/newview/llvlcomposition.cpp         |  2 +-
 indra/newview/llvoavatar.cpp              | 56 +++++++++++------------
 indra/newview/llvoavatarself.cpp          | 16 +++----
 indra/newview/llvoicechannel.cpp          |  2 +-
 indra/newview/llvoicevivox.cpp            | 48 +++++++++----------
 indra/newview/llvovolume.cpp              | 38 +++++++--------
 indra/newview/llwearablelist.cpp          | 10 ++--
 indra/newview/llwebprofile.cpp            |  6 +--
 indra/newview/llwind.cpp                  |  2 +-
 indra/newview/llwlhandlers.cpp            |  6 +--
 indra/newview/llworld.cpp                 |  2 +-
 indra/newview/llworldmapview.cpp          |  2 +-
 indra/newview/llxmlrpclistener.cpp        | 12 ++---
 indra/newview/pipeline.cpp                | 12 ++---
 80 files changed, 379 insertions(+), 379 deletions(-)

diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 48517804c96..b747e591e56 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -559,7 +559,7 @@ void LLAvatarAppearance::computeBodySize()
 	{
 		mBodySize = new_body_size;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         compareJointStateMaps(mLastBodySizeState, mCurrBodySizeState);
 #endif
 	}
@@ -613,7 +613,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
 {
 	LLJoint* joint = NULL;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("BVH") << "bone info: name " << info->mName
                      << " isJoint " << info->mIsJoint
                      << " volume_num " << volume_num
diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp
index d92727af85d..1d0c4877829 100644
--- a/indra/llappearance/llavatarjointmesh.cpp
+++ b/indra/llappearance/llavatarjointmesh.cpp
@@ -53,7 +53,7 @@ LLAvatarJoint *getBaseSkeletonAncestor(LLAvatarJoint* joint)
     LLJoint *ancestor = joint->getParent();
     while (ancestor->getParent() && (ancestor->getSupport() != LLJoint::SUPPORT_BASE))
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("Avatar") << "skipping non-base ancestor " << ancestor->getName() << LL_ENDL;
 #endif
         ancestor = ancestor->getParent();
@@ -331,7 +331,7 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
 	if (!mMesh->isLOD())
 	{
 		setupJoint((LLAvatarJoint*)getRoot());
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("Avatar") << getName() << " joint render entries: " << mMesh->mJointRenderData.size() << LL_ENDL;
 #endif
 	}
@@ -355,7 +355,7 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
 		}
 
 		// we've found a skinjoint for this joint..
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("Avatar") << "Mesh: " << getName() << " joint " << current_joint->getName() << " matches skinjoint " << sj << LL_ENDL;
 #endif
 
@@ -372,7 +372,7 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
 			// ...then just add ourselves
 			LLAvatarJoint* jointp = js.mJoint;
 			jrd.push_back(new LLJointRenderData(&jointp->getWorldMatrix(), &js));
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("Avatar") << "add joint[" << (jrd.size()-1) << "] = " << js.mJoint->getName() << LL_ENDL;
 #endif
 		}
@@ -380,11 +380,11 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
 		else
 		{
 			jrd.push_back(new LLJointRenderData(&ancestor->getWorldMatrix(), NULL));
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("Avatar") << "add2 ancestor joint[" << (jrd.size()-1) << "] = " << ancestor->getName() << LL_ENDL;
 #endif
 			jrd.push_back(new LLJointRenderData(&current_joint->getWorldMatrix(), &js));
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("Avatar") << "add2 joint[" << (jrd.size()-1) << "] = " << current_joint->getName() << LL_ENDL;
 #endif
 		}
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 15a0e1fbe82..bdfcb056db8 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -443,7 +443,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh
     bool has_active_override_before = hasAttachmentPosOverride( before_pos, before_mesh_id );
 	if (!m_attachmentPosOverrides.count())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		if (do_debug_joint(getName()))
 		{
 			LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " saving m_posBeforeOverrides " << getPosition() << LL_ENDL;
@@ -458,7 +458,7 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh
     if (!has_active_override_before || (after_pos != before_pos))
     {
         active_override_changed = true; 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         if (do_debug_joint(getName()))
         {
             LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " addAttachmentPosOverride for mesh " << mesh_id << " pos " << pos << LL_ENDL;
@@ -489,7 +489,7 @@ void LLJoint::removeAttachmentPosOverride( const LLUUID& mesh_id, const std::str
         if (!has_active_override_after || (after_pos != before_pos))
         {
             active_override_changed = true;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             if (do_debug_joint(getName()))
             {
                 LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName()
@@ -602,7 +602,7 @@ void LLJoint::updatePos(const std::string& av_info)
 	LLUUID mesh_id;
 	if (m_attachmentPosOverrides.findActiveOverride(mesh_id,found_pos))
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         if (do_debug_joint(getName()))
         {
             LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " updatePos, winner of " << m_attachmentPosOverrides.count() << " is mesh " << mesh_id << " pos " << found_pos << LL_ENDL;
@@ -612,7 +612,7 @@ void LLJoint::updatePos(const std::string& av_info)
 	}
 	else
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         if (do_debug_joint(getName()))
         {
             LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " updatePos, winner is posBeforeOverrides " << m_posBeforeOverrides << LL_ENDL;
@@ -632,7 +632,7 @@ void LLJoint::updateScale(const std::string& av_info)
 	LLUUID mesh_id;
 	if (m_attachmentScaleOverrides.findActiveOverride(mesh_id,found_scale))
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         if (do_debug_joint(getName()))
         {
             LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " updateScale, winner of " << m_attachmentScaleOverrides.count() << " is mesh " << mesh_id << " scale " << found_scale << LL_ENDL;
@@ -642,7 +642,7 @@ void LLJoint::updateScale(const std::string& av_info)
 	}
 	else
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         if (do_debug_joint(getName()))
         {
             LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " updateScale, winner is scaleBeforeOverrides " << m_scaleBeforeOverrides << LL_ENDL;
@@ -664,7 +664,7 @@ void LLJoint::addAttachmentScaleOverride( const LLVector3& scale, const LLUUID&
 	}
 	if (!m_attachmentScaleOverrides.count())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		if (do_debug_joint(getName()))
 		{
 			LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " saving m_scaleBeforeOverrides " << getScale() << LL_ENDL;
@@ -673,7 +673,7 @@ void LLJoint::addAttachmentScaleOverride( const LLVector3& scale, const LLUUID&
 		m_scaleBeforeOverrides = getScale();
 	}
 	m_attachmentScaleOverrides.add(mesh_id,scale);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	if (do_debug_joint(getName()))
 	{
 		LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " addAttachmentScaleOverride for mesh " << mesh_id << " scale " << scale << LL_ENDL;
@@ -693,7 +693,7 @@ void LLJoint::removeAttachmentScaleOverride( const LLUUID& mesh_id, const std::s
 	}
 	if (m_attachmentScaleOverrides.remove(mesh_id))
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		if (do_debug_joint(getName()))
 		{
 			LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName()
diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp
index 055d220674b..0da3fcbabe4 100644
--- a/indra/llcharacter/lljointsolverrp3.cpp
+++ b/indra/llcharacter/lljointsolverrp3.cpp
@@ -142,7 +142,7 @@ void LLJointSolverRP3::solve()
 	LLVector3 cPos = mJointC->getWorldPosition();
 	LLVector3 gPos = mJointGoal->getWorldPosition();
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("JointSolver") << "LLJointSolverRP3::solve()" << LL_NEWLINE
 							<< "bPosLocal = " << mJointB->getPosition() << LL_NEWLINE
 							<< "cPosLocal = " << mJointC->getPosition() << LL_NEWLINE
@@ -188,7 +188,7 @@ void LLJointSolverRP3::solve()
 	//-------------------------------------------------------------------------
 	LLVector3 abacCompOrthoVec = abVec - acVec * ((abVec * acVec)/(acVec * acVec));
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("JointSolver") << "abVec : " << abVec << LL_NEWLINE
 		<< "bcVec : " << bcVec << LL_NEWLINE
 		<< "acVec : " << acVec << LL_NEWLINE
@@ -265,7 +265,7 @@ void LLJointSolverRP3::solve()
 
 	LLQuaternion bRot(theta - abbcAng, abbcOrthoVec);
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("JointSolver") << "abbcAng      : " << abbcAng << LL_NEWLINE
 							<< "abbcOrthoVec : " << abbcOrthoVec << LL_NEWLINE
 							<< "agLenSq      : " << agLenSq << LL_NEWLINE
@@ -291,7 +291,7 @@ void LLJointSolverRP3::solve()
 	LLQuaternion cgRot;
 	cgRot.shortestArc( acVec, agVec );
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("JointSolver") << "bcVec : " << bcVec << LL_NEWLINE
 							<< "acVec : " << acVec << LL_NEWLINE
 							<< "cgRot : " << cgRot << LL_ENDL;
@@ -358,7 +358,7 @@ void LLJointSolverRP3::solve()
 	//-------------------------------------------------------------------------
 	LLQuaternion twistRot( mTwist, agVec );
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("JointSolver") << "abcNorm = " << abcNorm << LL_NEWLINE
 							<< "apgNorm = " << apgNorm << LL_NEWLINE
 							<< "pRot = " << pRot << LL_NEWLINE
diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp
index f3fc51537c2..f14c0e008c7 100644
--- a/indra/llcommon/lleventcoro.cpp
+++ b/indra/llcommon/lleventcoro.cpp
@@ -176,7 +176,7 @@ postAndSuspendSetup(const std::string& callerName,
                 auto& statsd = status["status"];
                 if (statsd.asString() != "running")
                 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
                     LL_DEBUGS("lleventcoro") << listenerName
                                              << " spotted status " << statsd
                                              << ", throwing Stopping" << LL_ENDL;
@@ -213,7 +213,7 @@ postAndSuspendSetup(const std::string& callerName,
                 catch(const boost::fibers::promise_already_satisfied & ex)
                 {
                     (void)ex;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
                     LL_DEBUGS("lleventcoro") << "promise already satisfied in '"
                         << listenerName << "': "  << ex.what() << LL_ENDL;
 #else
@@ -233,7 +233,7 @@ postAndSuspendSetup(const std::string& callerName,
         // request event.
         LLSD modevent(event);
         storeToLLSDPath(modevent, replyPumpNamePath, replyPump.getName());
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("lleventcoro") << callerName << ": coroutine " << listenerName
                                  << " posting to " << requestPump.getName()
                                  << LL_ENDL;
@@ -243,7 +243,7 @@ postAndSuspendSetup(const std::string& callerName,
         //                         << ": " << modevent << LL_ENDL;
         requestPump.post(modevent);
     }
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("lleventcoro") << callerName << ": coroutine " << listenerName
                              << " about to wait on LLEventPump " << replyPump.getName()
                              << LL_ENDL;
@@ -271,7 +271,7 @@ LLSD llcoro::postAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requ
     // calling get() on the future makes us wait for it
     LLCoros::TempStatus st(STRINGIZE("waiting for " << replyPump.getPump().getName()));
     LLSD value(future.get());
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("lleventcoro") << "postAndSuspend(): coroutine " << listenerName
                              << " resuming with " << value << LL_ENDL;
 #endif
@@ -311,7 +311,7 @@ LLSD llcoro::postAndSuspendWithTimeout(const LLSD& event,
     // if the future is NOT yet ready, return timeoutResult instead
     if (status == boost::fibers::future_status::timeout)
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("lleventcoro") << "postAndSuspendWithTimeout(): coroutine " << listenerName
                                  << " timed out after " << timeout << " seconds,"
                                  << " resuming with " << timeoutResult << LL_ENDL;
@@ -324,7 +324,7 @@ LLSD llcoro::postAndSuspendWithTimeout(const LLSD& event,
 
         // future is now ready, no more waiting
         LLSD value(future.get());
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("lleventcoro") << "postAndSuspendWithTimeout(): coroutine " << listenerName
                                  << " resuming with " << value << LL_ENDL;
 #endif
diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp
index 7e0d9ffe518..9332904f94c 100644
--- a/indra/llcommon/llprocess.cpp
+++ b/indra/llcommon/llprocess.cpp
@@ -118,7 +118,7 @@ class LLProcessListener
 		// centralize such calls, using "mainloop" to ensure it happens once
 		// per frame, and refcounting running LLProcess objects to remain
 		// registered only while needed.
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLProcess") << "calling apr_proc_other_child_refresh_all()" << LL_ENDL;
 #endif
 		apr_proc_other_child_refresh_all(APR_OC_REASON_RUNNING);
diff --git a/indra/llcorehttp/_httppolicy.cpp b/indra/llcorehttp/_httppolicy.cpp
index 85ca3108e43..ff364bc7418 100644
--- a/indra/llcorehttp/_httppolicy.cpp
+++ b/indra/llcorehttp/_httppolicy.cpp
@@ -162,14 +162,14 @@ void HttpPolicy::retryOp(const HttpOpRequest::ptr_t &op)
 	// mPolicyRetries limited to 100
 	U32 delta_factor = op->mPolicyRetries <= 10 ? 1 << op->mPolicyRetries : 1024;
 	HttpTime delta = llmin(delta_min * delta_factor, delta_max);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	bool external_delta(false);
 #endif
 
 	if (op->mReplyRetryAfter > 0 && op->mReplyRetryAfter < 30)
 	{
 		delta = op->mReplyRetryAfter * U64L(1000000);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		external_delta = true;
 #endif
 	}
@@ -179,7 +179,7 @@ void HttpPolicy::retryOp(const HttpOpRequest::ptr_t &op)
 	{
 		++op->mPolicy503Retries;
 	}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS(LOG_CORE) << "HTTP request " << op->getHandle()
 						<< " retry " << op->mPolicyRetries
 						<< " scheduled in " << (delta / HttpTime(1000))
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp
index c5292b24ada..f7c2e0678ff 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -526,7 +526,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
 			// which to build this string), then intentionally return a blank
 			// string to the caller and skip the below warning about a blank
 			// prefix.
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("LLDir") << "getLindenUserDir() not yet set: "
 							   << ELLPathToString(location)
 							   << ", '" << subdir1 << "', '" << subdir2 << "', '" << in_filename
@@ -611,7 +611,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
 	expanded_filename += mDirDelimiter;
 	expanded_filename += in_filename;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("LLDir") << ELLPathToString(location)
 					   << ", '" << subdir1 << "', '" << subdir2 << "', '" << in_filename
 					   << "' => '" << expanded_filename << "'" << LL_ENDL;
@@ -728,7 +728,7 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
 		("textures")                // textures not localized
 	;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("LLDir") << "subdir '" << subdir << "', filename '" << filename
 					   << "', constraint "
 					   << ((constraint == CURRENT_SKIN)? "CURRENT_SKIN" : "ALL_SKINS")
@@ -855,8 +855,8 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
 		}
 	}
 
-#if SHOW_DEBUG
-	LL_DEBUGS("LLDir") << empty;
+#ifdef SHOW_DEBUG
+	LL_DEBUGS("LLDir") << std::string();
 	const char* comma = "";
 	for (const std::string& path : results)
 	{
diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp
index 8404fdf5721..c8467a1ad7e 100644
--- a/indra/llimagej2coj/llimagej2coj.cpp
+++ b/indra/llimagej2coj/llimagej2coj.cpp
@@ -369,7 +369,7 @@ bool LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
 		}
 		else // Some rare OpenJPEG versions have this bug.
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("Texture") << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << LL_ENDL;
 #endif
 			opj_image_destroy(image);
diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp
index 2253532a379..77080b87d04 100644
--- a/indra/llmessage/llavatarname.cpp
+++ b/indra/llmessage/llavatarname.cpp
@@ -259,7 +259,7 @@ std::string LLAvatarName::getUserName(bool lowercase) const
 
 void LLAvatarName::dump() const
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("AvNameCache") << "LLAvatarName: "
 	                         << "user '" << mUsername << "' "
 							 << "display '" << mDisplayName << "' "
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 8579e6b0f63..a780151833d 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -214,7 +214,7 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h
         // Use expiration time from header
         av_name.mExpires = expires;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AvNameCache") << "LLAvatarNameResponder::result for " << agent_id << LL_ENDL;
 #endif
         av_name.dump();
@@ -242,7 +242,7 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h
             LLAvatarNameCache::handleAgentError(agent_id);
         }
     }
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("AvNameCache") << "LLAvatarNameResponder::result "
         << LLAvatarNameCache::mCache.size() << " cached names"
         << LL_ENDL;
@@ -616,7 +616,7 @@ bool LLAvatarNameCache::getName(const LLUUID& agent_id, LLAvatarName *av_name)
 			{
 				if (!isRequestPending(agent_id))
 				{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("AvNameCache") << "LLAvatarNameCache refresh agent " << agent_id
 											 << LL_ENDL;
 #endif
@@ -630,7 +630,7 @@ bool LLAvatarNameCache::getName(const LLUUID& agent_id, LLAvatarName *av_name)
 
 	if (!isRequestPending(agent_id))
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AvNameCache") << "LLAvatarNameCache queue request for agent " << agent_id << LL_ENDL;
 #endif
 		mAskQueue.insert(agent_id);
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 35b82b07e69..8dad90afded 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -966,7 +966,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
 					mDirtyRect.unionWith(newDirtyRect);
 				}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("Plugin") << "adjusted incoming rect is: ("
 					<< newDirtyRect.mLeft << ", "
 					<< newDirtyRect.mTop << ", "
diff --git a/indra/llplugin/llpluginmessagepipe.cpp b/indra/llplugin/llpluginmessagepipe.cpp
index 77a0b0599d2..bba90d7879b 100644
--- a/indra/llplugin/llpluginmessagepipe.cpp
+++ b/indra/llplugin/llpluginmessagepipe.cpp
@@ -304,7 +304,7 @@ bool LLPluginMessagePipe::pumpInput(F64 timeout)
 
 				if(status == APR_SUCCESS)
 				{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("PluginSocket") << "success, read " << size << LL_ENDL;
 #endif
 					if(size != request_size)
@@ -315,7 +315,7 @@ bool LLPluginMessagePipe::pumpInput(F64 timeout)
 				}
 				else if(APR_STATUS_IS_TIMEUP(status))
 				{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("PluginSocket") << "TIMEUP, read " << size << LL_ENDL;
 #endif
 					// Timeout was hit.  Since the initial read is 1 byte, this should never be a partial read.
@@ -323,7 +323,7 @@ bool LLPluginMessagePipe::pumpInput(F64 timeout)
 				}
 				else if(APR_STATUS_IS_EAGAIN(status))
 				{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("PluginSocket") << "EAGAIN, read " << size << LL_ENDL;
 #endif
 					// Non-blocking read returned immediately.
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index c092e0af605..15242f74038 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -678,7 +678,7 @@ void LLPluginProcessParent::sendMessage(const LLPluginMessage &message)
 	}
 	
 	std::string buffer = message.generate();
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL;	
 #endif
 	writeMessageRaw(buffer);
@@ -932,7 +932,7 @@ void LLPluginProcessParent::servicePoll()
 
 void LLPluginProcessParent::receiveMessageRaw(const std::string &message)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Plugin") << "Received: " << message << LL_ENDL;
 #endif
 	
@@ -1043,7 +1043,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
 			mHeartbeat.setTimerExpirySec(mPluginLockupTimeout);
 
 			mCPUUsage = message.getValueReal("cpu_usage");
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("Plugin") << "cpu usage reported as " << mCPUUsage << LL_ENDL;
 #endif
 			
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index e6babece2ec..118bcb7205d 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -1094,7 +1094,7 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat
 	
 	while ((cur_ptr < buffer_end) && (*cur_ptr != 0))
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("TEFieldDecode") << "TE exception" << LL_ENDL;
 #endif
 		i = 0;
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 2c4224aeb74..2dbfc561934 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1861,7 +1861,7 @@ LLTexUnit* LLRender::getTexUnit(U32 index)
 	}
 	else 
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS() << "Non-existing texture unit layer requested: " << index << LL_ENDL;
 #endif
 		return mDummyTexUnit;
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 8d0e4b9d7a5..e9a6adbd52c 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -608,7 +608,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
 
 		// We only handle the click if the click both started and ended within us
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL;
 #endif
 	}
diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp
index 8cb5ddc3c59..fbf1fcc8f10 100644
--- a/indra/llui/lldraghandle.cpp
+++ b/indra/llui/lldraghandle.cpp
@@ -365,7 +365,7 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
 		mDragLastScreenY += delta_y;
 
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" <<LL_ENDL;		
 #endif
 		handled = TRUE;
@@ -373,7 +373,7 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
 	else
 	{
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;		
 #endif
 		handled = TRUE;
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index d89e79a19b7..fdc66b70f65 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -869,7 +869,7 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask)
 		mKeystrokeTimer.reset();
 
 		getWindow()->setCursor(UI_CURSOR_IBEAM);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL;	
 #endif
 		handled = TRUE;
@@ -878,7 +878,7 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask)
 	if( !handled  )
 	{
 		getWindow()->setCursor(UI_CURSOR_IBEAM);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;		
 #endif
 		handled = TRUE;
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 5aa14b2fbf6..46a1b5d0f16 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -316,7 +316,7 @@ BOOL LLMenuItemGL::addToAcceleratorList(std::list <LLMenuKeyboardBinding*> *list
 void LLMenuItemGL::appendAcceleratorString( std::string& st ) const
 {
 	st = LLKeyboard::stringFromAccelerator( mAcceleratorMask, mAcceleratorKey );
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("HotKeys") << "appendAcceleratorString: " << st << LL_ENDL;
 #endif
 }
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index cef56377b21..23e99a090b2 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -195,7 +195,7 @@ BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask)
 	if( childrenHandleHover(x, y, mask) == NULL )
 	{
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL;	
 #endif
 	}
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index eaee50847dc..e3d314fc6b2 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -506,7 +506,7 @@ BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
 		onCommit();
 
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL;		
 #endif
 	}
@@ -531,7 +531,7 @@ BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
         }
 
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;		
 #endif
 	}
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 2103357bcb9..82f48c535db 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -1765,7 +1765,7 @@ LLNotificationPtr LLNotifications::find(LLUUID uuid)
 	LLNotificationSet::iterator it=mItems.find(target);
 	if (it == mItems.end())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Notifications") << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << LL_ENDL;
 #endif
 		return LLNotificationPtr((LLNotification*)NULL);
@@ -1830,7 +1830,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
 	for(it = mVisibilityRules.begin(); it != mVisibilityRules.end(); it++)
 	{
 		// An empty type/tag/name string will match any notification, so only do the comparison when the string is non-empty in the rule.
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Notifications")
 			<< "notification \"" << n->getName() << "\" " 
 			<< "testing against " << ((*it)->mVisible?"show":"hide") << " rule, "
@@ -1877,7 +1877,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
 			if((*it)->mResponse.empty())
 			{
 				// Response property is empty.  Cancel this notification.
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("Notifications") << "cancelling notification " << n->getName() << LL_ENDL;
 #endif
 
@@ -1890,7 +1890,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
 				// TODO: verify that the response template has an item with the correct name
 				response[(*it)->mResponse] = true;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("Notifications") << "responding to notification " << n->getName() << " with response = " << response << LL_ENDL;
 #endif
 				
@@ -1904,7 +1904,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
 		break;
 	}
 	
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Notifications") << "allowing notification " << n->getName() << LL_ENDL;
 #endif
 
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index 260119734f1..7b9a8eddfab 100644
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -381,7 +381,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
 		}
 
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL;	
 #endif
 		handled = TRUE;
@@ -395,7 +395,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask)
 	if( !handled )
 	{
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)"  << LL_ENDL;	
 #endif
 		handled = TRUE;
diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp
index 5e8c6d9599d..e6a4ac5fc2c 100644
--- a/indra/llui/llslider.cpp
+++ b/indra/llui/llslider.cpp
@@ -186,14 +186,14 @@ BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask)
 			setValueAndCommit(t * (mMaxValue - mMinValue) + mMinValue );
 		}
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL;
 #endif
 	}
 	else
 	{
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;	
 #endif
 	}
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 1451eace394..29054868aa3 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2406,7 +2406,7 @@ void LLTextBase::setFont(const LLFontGL* font)
 
 void LLTextBase::needsReflow(S32 index)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS() << "reflow on object " << (void*)this << " index = " << mReflowIndex << ", new index = " << index << LL_ENDL;
 #endif
 	mReflowIndex = llmin(mReflowIndex, index);
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 2764c3561ca..72ccf556b17 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -859,7 +859,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
 			setCursorAtLocalPos( clamped_x, clamped_y, true );
 			mSelectionEnd = mCursorPos;
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL;	
 #endif
 		getWindow()->setCursor(UI_CURSOR_IBEAM);
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 515488006a3..65fe405bc77 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -343,7 +343,7 @@ void LLUICtrl::onMouseLeave(S32 x, S32 y, MASK mask)
 //virtual 
 BOOL LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS() << "LLUICtrl::handleMouseDown calling	LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL;
 #endif
   
@@ -353,7 +353,7 @@ BOOL LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask)
 	{
 		(*mMouseDownSignal)(this,x,y,mask);
 	}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS() << "LLUICtrl::handleMousedown - handled is returning as: " << handled << "	  " << LL_ENDL;
 #endif
 	
@@ -368,7 +368,7 @@ BOOL LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask)
 //virtual
 BOOL LLUICtrl::handleMouseUp(S32 x, S32 y, MASK mask)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS() << "LLUICtrl::handleMouseUp calling LLView)'s handleMouseUp (first initialized xui to: " << getPathname() << " )" << LL_ENDL;
 #endif
 
@@ -384,7 +384,7 @@ BOOL LLUICtrl::handleMouseUp(S32 x, S32 y, MASK mask)
 		(*mMouseUpSignal)(this,x,y,mask);
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS() << "LLUICtrl::handleMouseUp - handled for xui " << getPathname() << "  -  is returning as: " << handled << "   " << LL_ENDL;
 #endif
 
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 0e547dce767..0bbacf13a84 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -755,7 +755,7 @@ LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDA
 		if ((viewp->*method)( local_x, local_y, extra )
 			|| (allow_mouse_block && viewp->blockMouseEvent( local_x, local_y )))
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS() << "LLView::childrenHandleMouseEvent calling updatemouseeventinfo - local_x|global x  "<< local_x << " " << x	<< "local/global y " << local_y << " " << y << LL_ENDL;
 			LL_DEBUGS() << "LLView::childrenHandleMouseEvent  getPathname for viewp result: " << viewp->getPathname() << "for this view: " << getPathname() << LL_ENDL;
 #endif
@@ -947,7 +947,7 @@ BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
 			// For event logging we don't care which widget handles it
 			// So we capture the key at the end of this function once we know if it was handled
 			handled = handleKeyHere( key, mask );
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			if (handled)
 			{
 				LL_DEBUGS() << "Key handled by " << getName() << LL_ENDL;
@@ -981,7 +981,7 @@ BOOL LLView::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent)
 			// For event logging we don't care which widget handles it
 			// So we capture the key at the end of this function once we know if it was handled
 			handled = handleKeyUpHere(key, mask);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			if (handled)
 			{
 				LL_DEBUGS() << "Key handled by " << getName() << LL_ENDL;
diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp
index cb379dfe4e8..6260c33d325 100644
--- a/indra/llwindow/llkeyboard.cpp
+++ b/indra/llwindow/llkeyboard.cpp
@@ -255,7 +255,7 @@ BOOL LLKeyboard::handleTranslatedKeyUp(KEY translated_key, U32 translated_mask)
 		handled = mCallbacks->handleTranslatedKeyUp(translated_key, translated_mask);
 	}
 	
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("UserInput") << "keyup -" << translated_key << "-" << LL_ENDL;
 #endif
 
diff --git a/indra/newview/alaoengine.cpp b/indra/newview/alaoengine.cpp
index cd7446a5232..9ea7cc7d9f8 100644
--- a/indra/newview/alaoengine.cpp
+++ b/indra/newview/alaoengine.cpp
@@ -349,7 +349,7 @@ void ALAOEngine::setStateCycleTimer(const ALAOSet::AOState* state)
 
 const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("AOEngine") << "override(" << pMotion << "," << start << ")" << LL_ENDL;
 #endif
 
@@ -365,13 +365,13 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 			if (state)
 			{
 				setLastMotion(motion);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("AOEngine") << "(disabled AO) setting last motion id to " <<  gAnimLibrary.animationName(mLastMotion) << LL_ENDL;
 #endif
 				if (!state->mAnimations.empty())
 				{
 					setLastOverriddenMotion(motion);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("AOEngine") << "(disabled AO) setting last overridden motion id to " <<  gAnimLibrary.animationName(mLastOverriddenMotion) << LL_ENDL;
 #endif
 				}
@@ -382,7 +382,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 
 	if (mSets.empty())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AOEngine") << "No sets loaded. Skipping overrider." << LL_ENDL;
 #endif
 		return animation;
@@ -390,7 +390,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 
 	if (!mCurrentSet)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AOEngine") << "No current AO set chosen. Skipping overrider." << LL_ENDL;
 #endif
 		return animation;
@@ -405,7 +405,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 	ALAOSet::AOState* state = mCurrentSet->getStateByRemapID(motion);
 	if (!state)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AOEngine") << "No current AO state for motion " << motion << " (" << gAnimLibrary.animationName(motion) << ")." << LL_ENDL;
 #endif
 		return animation;
@@ -417,7 +417,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 	if (start)
 	{
 		setLastMotion(motion);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AOEngine") << "(enabled AO) setting last motion id to " <<  gAnimLibrary.animationName(mLastMotion) << LL_ENDL;
 #endif
 
@@ -426,7 +426,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 			motion == ANIM_AGENT_STAND &&
 			mInMouselook)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("AOEngine") << "(enabled AO, mouselook stand stopped) setting last motion id to " <<  gAnimLibrary.animationName(mLastMotion) << LL_ENDL;
 #endif
 			return animation;
@@ -435,7 +435,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 		// Do not start override sits if not selected
 		if (!mCurrentSet->getSitOverride() && motion == ANIM_AGENT_SIT)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("AOEngine") << "(enabled AO, sit override stopped) setting last motion id to " <<  gAnimLibrary.animationName(mLastMotion) << LL_ENDL;
 #endif
 			return animation;
@@ -447,7 +447,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 			const LLViewerObject* agentRoot = dynamic_cast<LLViewerObject*>(gAgentAvatarp->getRoot());
 			if (agentRoot && agentRoot->getID() != gAgentID)
 			{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("AOEngine") << "Ground sit animation playing but sitting on a prim - disabling overrider." << LL_ENDL;
 #endif
 				return animation;
@@ -457,7 +457,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 		if (!state->mAnimations.empty())
 		{
 			setLastOverriddenMotion(motion);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("AOEngine") << "(enabled AO) setting last overridden motion id to " <<  gAnimLibrary.animationName(mLastOverriddenMotion) << LL_ENDL;
 #endif
 		}
@@ -481,7 +481,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 
 		if (state->mCurrentAnimationID.notNull())
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("AOEngine")	<< "Previous animation for state "
 						<< gAnimLibrary.animationName(motion)
 						<< " was not stopped, but we were asked to start a new one. Killing old animation." << LL_ENDL;
@@ -491,7 +491,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 		}
 
 		state->mCurrentAnimationID = animation;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AOEngine")	<< "overriding " <<  gAnimLibrary.animationName(motion)
 					<< " with " << animation
 					<< " in state " << state->mName
@@ -571,7 +571,7 @@ const LLUUID ALAOEngine::override(const LLUUID& pMotion, const bool start)
 		{
 			stopAllSitVariants();
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AOEngine") << "stopping cycle timer for motion " <<  gAnimLibrary.animationName(motion) <<
 					" using animation " << animation <<
 					" in state " << state->mName << LL_ENDL;
@@ -885,12 +885,12 @@ bool ALAOEngine::findForeignItems(const LLUUID& uuid) const
 			{
 				if (item->getInventoryType() != LLInventoryType::IT_ANIMATION)
 				{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("AOEngine") << item->getName() << " is a link but does not point to an animation." << LL_ENDL;
 #endif
 					move = true;
 				}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				else
 				{
 					LL_DEBUGS("AOEngine") << item->getName() << " is an animation link." << LL_ENDL;
@@ -899,7 +899,7 @@ bool ALAOEngine::findForeignItems(const LLUUID& uuid) const
 			}
 			else
 			{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("AOEngine") << item->getName() << " is not a link!" << LL_ENDL;
 #endif
 				move = true;
@@ -910,7 +910,7 @@ bool ALAOEngine::findForeignItems(const LLUUID& uuid) const
 				moved = true;
 				LLInventoryModel* model = &gInventory;
 				model->changeItemParent(item, gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND), FALSE);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("AOEngine") << item->getName() << " moved to lost and found!" << LL_ENDL;
 #endif
 			}
@@ -1056,7 +1056,7 @@ void ALAOEngine::reloadStateAnimations(ALAOSet::AOState* state)
 	gInventory.getDirectDescendentsOf(state->mInventoryUUID, dummy, items);
 	for (auto& item : *items)
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AOEngine")	<< "Found animation link " << item->LLInventoryItem::getName()
 					<< " desc " << item->LLInventoryItem::getDescription()
 					<< " asset " << item->getAssetUUID() << LL_ENDL;
@@ -1075,7 +1075,7 @@ void ALAOEngine::reloadStateAnimations(ALAOSet::AOState* state)
 			sortOrder = -1;
 		}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AOEngine") << "current sort order is " << sortOrder << LL_ENDL;
 #endif
 
@@ -1091,7 +1091,7 @@ void ALAOEngine::reloadStateAnimations(ALAOSet::AOState* state)
 			{
 				if (state->mAnimations[index].mSortOrder > sortOrder)
 				{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("AOEngine") << "inserting at index " << index << LL_ENDL;
 #endif
 					state->mAnimations.emplace(state->mAnimations.begin() + index, 
@@ -1102,13 +1102,13 @@ void ALAOEngine::reloadStateAnimations(ALAOSet::AOState* state)
 			}
 			if (!inserted)
 			{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("AOEngine") << "not inserted yet, appending to the list instead" << LL_ENDL;
 #endif
 				state->mAnimations.emplace_back(linkedItem->LLInventoryItem::getName(), item->getAssetUUID(), item->getUUID(), sortOrder);
 			}
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AOEngine") << "Animation count now: " << state->mAnimations.size() << LL_ENDL;
 #endif
 	}
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 08c61fcfd95..c53bb193565 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -952,7 +952,7 @@ void AISUpdate::doUpdate()
 	for (std::map<LLUUID,S32>::const_iterator catit = mCatDescendentDeltas.begin();
 		 catit != mCatDescendentDeltas.end(); ++catit)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Inventory") << "descendant accounting for " << catit->first << LL_ENDL;
 #endif
 
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index dc2678cc7ca..df0ad2b8a7c 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -254,7 +254,7 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
 			LLAvatarNameCache::get(agent_id, &av_name);
 
 			addChangedMask(LLFriendObserver::ADD, agent_id);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS() << "Added buddy " << agent_id
 					<< ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline")
 					<< ", TO: " << mBuddyInfo[agent_id]->getRightsGrantedTo()
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index c1e322ddda2..76657c8dae6 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -135,7 +135,7 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
 				F32 target_dist = (offset_dist - max_legal_offset);
 				new_pos_fixup = (target_dist/offset_dist)*pos_box_offset;
 			}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			if (new_pos_fixup != mPositionConstraintFixup)
 			{
 				LL_DEBUGS("ConstraintFix") << getFullname() << " pos fix, offset_dist " << offset_dist << " pos fixup " 
@@ -150,7 +150,7 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
         if (box_size/mScaleConstraintFixup > max_legal_size)
         {
             new_scale_fixup = mScaleConstraintFixup*max_legal_size/box_size;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("ConstraintFix") << getFullname() << " scale fix, box_size " << box_size << " fixup " 
 									   << mScaleConstraintFixup << " max legal " << max_legal_size 
 									   << " -> new scale " << new_scale_fixup << LL_ENDL;
@@ -238,7 +238,7 @@ void LLControlAvatar::matchVolumeTransform()
 	        const LLMeshSkinInfo* skin_info = mRootVolp->getSkinInfo();
 			if (skin_info)
 			{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
                 LL_DEBUGS("BindShape") << getFullname() << " bind shape " << skin_info->mBindShapeMatrix << LL_ENDL;
 #endif
                 alignas(16) LLMatrix4 mat(LLMatrix4::kUninitialized);
@@ -587,7 +587,7 @@ void LLControlAvatar::updateAnimations()
                 // Animation not already present, use this sequence id.
                 anims[anim_pair.first] = anim_pair.second;
             }
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("AnimatedObjectsNotify") << "found anim for vol " << volp->getID() << " anim " << anim_it->first << " root " << mRootVolp->getID() << LL_ENDL;
 #endif
         }
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 9c994c99e42..d6f10c38d55 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -245,7 +245,7 @@ void LLDrawPoolWLSky::renderStars() const
 	// If star brightness is not set, exit
 	if( star_alpha.mV[3] < 0.001 )
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("SKY") << "star_brightness below threshold." << LL_ENDL;
 #endif
 		return;
@@ -312,7 +312,7 @@ void LLDrawPoolWLSky::renderStarsDeferred() const
 	// If start_brightness is not set, exit
 	if(star_alpha < 0.001f)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("SKY") << "star_brightness below threshold." << LL_ENDL;
 #endif
 		return;
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 632aef62b0a..cfcff09d2ba 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -1486,7 +1486,7 @@ void LLFavoritesOrderStorage::getSLURL(const LLUUID& asset_id)
 		boost::bind(&LLFavoritesOrderStorage::onLandmarkLoaded, this, asset_id, _1));
 	if (lm)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("FavoritesBar") << "landmark for " << asset_id << " already loaded" << LL_ENDL;
 #endif
 		onLandmarkLoaded(asset_id, lm);
@@ -1745,7 +1745,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar
 {
 	if (landmark)
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("FavoritesBar") << "landmark for " << asset_id << " loaded" << LL_ENDL;
 #endif
         LLVector3d pos_global;
@@ -1758,7 +1758,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar
 
         if (!pos_global.isExactlyZero())
         {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         	LL_DEBUGS("FavoritesBar") << "requesting slurl for landmark " << asset_id << LL_ENDL;
 #endif
         	LLLandmarkActions::getSLURLfromPosGlobal(pos_global,
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 985a5dc94e9..46b34666783 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -539,7 +539,7 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
 
 	bool shouldBeAdded = true;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LLAvatarName av_name;
 	LLAvatarNameCache::get(avatarID, &av_name);
 	const std::string& name = av_name.getAccountName();
@@ -551,7 +551,7 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
     if (shouldBeAdded && !isManagerReady())
     {
         shouldBeAdded = false;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS() << "Calling cards manager not ready, state: " << getManagerState() << LL_ENDL;
 #endif
     }
@@ -559,7 +559,7 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
 	if (shouldBeAdded && findFriendCardInventoryUUIDImpl(avatarID).notNull())
 	{
 		shouldBeAdded = false;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS() << "is found in Inventory: " << name << LL_ENDL; 
 #endif
 	}
@@ -567,7 +567,7 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
 	if (shouldBeAdded && isAvatarDataStored(avatarID))
 	{
 		shouldBeAdded = false;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS() << "is found in sentRequests: " << name << LL_ENDL; 
 #endif
 	}
@@ -575,7 +575,7 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
 	if (shouldBeAdded)
 	{
 		putAvatarData(avatarID);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS() << "Sent create_inventory_item for " << avatarID << ", " << name << LL_ENDL;
 #endif
 
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index e89a80a293d..f38a36d9e6f 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2167,7 +2167,7 @@ bool LLInventoryModel::loadSkeleton(
 	const LLSD& options,
 	const LLUUID& owner_id)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS(LOG_INV) << "importing inventory skeleton for " << owner_id << LL_ENDL;
 #endif
 
@@ -2327,7 +2327,7 @@ bool LLInventoryModel::loadSkeleton(
 						if (item->getIsBrokenLink())
 						{
 							//bad_link_count++;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 							LL_DEBUGS(LOG_INV) << "Attempted to add cached link item without baseobj present ( name: "
 											   << item->getName() << " itemID: " << item->getUUID()
 											   << " assetID: " << item->getAssetUUID()
@@ -2399,7 +2399,7 @@ bool LLInventoryModel::loadSkeleton(
 		{
 			LLViewerInventoryCategory* cat = (*invalid_cat_it).get();
 			cat->setVersion(NO_VERSION);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_INV) << "Invalidating category name: " << cat->getName() << " UUID: " << cat->getUUID() << " due to invalid descendents cache" << LL_ENDL;
 #endif
 		}
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 31924269181..510f00a5530 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -227,13 +227,13 @@ BOOL LLManip::handleHover(S32 x, S32 y, MASK mask)
 			setMouseCapture( FALSE );
 		}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLManip (active)" << LL_ENDL;
 #endif
 	}
 	else
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLManip (inactive)" << LL_ENDL;
 #endif
 	}
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 791a4483975..ffa7fdc80b5 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -522,14 +522,14 @@ BOOL LLManipRotate::handleHover(S32 x, S32 y, MASK mask)
 			drag(x, y);
 		}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (active)" << LL_ENDL;		
 #endif
 	}
 	else
 	{
 		highlightManipulators(x, y);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLManipRotate (inactive)" << LL_ENDL;		
 #endif
 	}
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 777adf24dd9..4a6ceb49b80 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -428,7 +428,7 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask)
 				drag( x, y );
 			}
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLManipScale (active)" << LL_ENDL;	
 #endif
 	}
@@ -560,7 +560,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y)
 		}
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("UserInput") << "hover handled by LLManipScale (inactive)" << LL_ENDL;
 #endif
 }
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 66eed6c134a..bba75588de6 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -413,7 +413,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
 	// Bail out if mouse not down.
 	if( !hasMouseCapture() )
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (inactive)" << LL_ENDL;	
 #endif
 		// Always show cursor
@@ -451,7 +451,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
 	// rotation above.
 	if( x == mLastHoverMouseX && y == mLastHoverMouseY && !rotated)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse unmoved)" << LL_ENDL;
 #endif
 		gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
@@ -466,7 +466,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
 	{
 		if (abs(mMouseDownX - x) < MOUSE_DRAG_SLOP && abs(mMouseDownY - y) < MOUSE_DRAG_SLOP )
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (mouse inside slop)" << LL_ENDL;
 #endif
 			gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
@@ -485,7 +485,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
 
 				// When we make the copy, we don't want to do any other processing.
 				// If so, the object will also be moved, and the copy will be offset.
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (made copy)" << LL_ENDL;
 #endif
 				gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
@@ -780,7 +780,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
 	gAgentCamera.clearFocusObject();
 	dialog_refresh_all();		// ??? is this necessary?
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("UserInput") << "hover handled by LLManipTranslate (active)" << LL_ENDL;
 #endif
 	gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index ed8c4571b19..d3c83226867 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -254,7 +254,7 @@ boost::signals2::connection LLMaterialMgr::getTE(const LLUUID& region_id, const
 	material_map_t::const_iterator itMaterial = mMaterials.find(material_id);
 	if (itMaterial != mMaterials.end())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Materials") << "region " << region_id << " found materialid " << material_id << LL_ENDL;
 #endif
 		get_callback_te_t signal;
@@ -269,13 +269,13 @@ boost::signals2::connection LLMaterialMgr::getTE(const LLUUID& region_id, const
 			get_queue_t::iterator itQueue = mGetQueue.find(region_id);
 			if (mGetQueue.end() == itQueue)
 			{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("Materials") << "mGetQueue inserting region "<<region_id << LL_ENDL;
 #endif
 				std::pair<get_queue_t::iterator, bool> ret = mGetQueue.emplace(std::pair<LLUUID, material_queue_t>(region_id, material_queue_t()));
 				itQueue = ret.first;
 			}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("Materials") << "adding material id " << material_id << LL_ENDL;
 #endif
 			itQueue->second.insert(material_id);
@@ -380,13 +380,13 @@ void LLMaterialMgr::setLocalMaterial(const LLUUID& region_id, LLMaterialPtr mate
 
 const LLMaterialPtr LLMaterialMgr::setMaterial(const LLUUID& region_id, const LLMaterialID& material_id, const LLSD& material_data)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Materials") << "region " << region_id << " material id " << material_id << LL_ENDL;
 #endif
 	material_map_t::const_iterator itMaterial = mMaterials.find(material_id);
 	if (mMaterials.end() == itMaterial)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Materials") << "new material" << LL_ENDL;
 #endif
 		LLMaterialPtr newMaterial(new LLMaterial(material_data));
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 9174751b51c..258ffd9cffc 100644
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -204,7 +204,7 @@ bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object)
 
 void LLMediaDataClient::removeFromQueue(const LLMediaDataClientObject::ptr_t &object)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("LLMediaDataClient") << "removing requests matching ID " << object->getID() << LL_ENDL;
 #endif
     PredicateMatchRequest upred(object->getID());
@@ -217,7 +217,7 @@ void LLMediaDataClient::startQueueTimer()
 {
 	if (! mQueueTimerIsRunning)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLMediaDataClient") << "starting queue timer (delay=" << mQueueTimerDelay << " seconds)" << LL_ENDL;
 #endif
 		// LLEventTimer automagically takes care of the lifetime of this object
@@ -238,7 +238,7 @@ bool LLMediaDataClient::processQueueTimer()
     if (isDoneProcessing())
 		return true;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, queue size is:	  " << mQueue.size() << LL_ENDL;
 	LL_DEBUGS("LLMediaDataClientQueue") << "QueueTimer::tick() started, SORTED queue is:	  " << mQueue << LL_ENDL;
 #endif	
@@ -246,7 +246,7 @@ bool LLMediaDataClient::processQueueTimer()
 	serviceQueue();
     serviceHttp();
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() finished, queue size is:	  " << mQueue.size() << LL_ENDL;
 	LL_DEBUGS("LLMediaDataClientQueue") << "QueueTimer::tick() finished, SORTED queue is:	  " << mQueue << LL_ENDL;
 #endif
@@ -261,7 +261,7 @@ LLMediaDataClient::Request::ptr_t LLMediaDataClient::dequeue()
 	
 	if (queue_p->empty())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLMediaDataClient") << "queue empty: " << (*queue_p) << LL_ENDL;
 #endif
 	}
@@ -569,7 +569,7 @@ void LLMediaDataClient::Request::updateScore()
 	F64 tmp = mObject->getMediaInterest();
 	if (tmp != mScore)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLMediaDataClient") << "Score for " << mObject->getID() << " changed from " << mScore << " to " << tmp << LL_ENDL; 
 #endif
 		mScore = tmp;
@@ -625,7 +625,7 @@ void LLMediaDataClient::Handler::onSuccess(LLCore::HttpResponse * response, cons
         LL_WARNS("LLMediaDataClient") << "dead request " << *mRequest << LL_ENDL;
         return;
     }
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("LLMediaDataClientResponse") << *mRequest << LL_ENDL;
 #endif
 }
@@ -729,7 +729,7 @@ void LLObjectMediaDataClient::enqueue(Request::ptr_t request)
 	static LLCachedControl<bool> audio_streaming_enabled(gSavedSettings, "AudioStreamingMedia", true);
 	if (!audio_streaming_enabled)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLMediaDataClient") << "not queueing request when Media is disabled " << *request << LL_ENDL;
 #endif
 		return;
@@ -737,7 +737,7 @@ void LLObjectMediaDataClient::enqueue(Request::ptr_t request)
 
 	if(request->isDead())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLMediaDataClient") << "not queueing dead request " << *request << LL_ENDL;
 #endif
 		return;
@@ -759,7 +759,7 @@ void LLObjectMediaDataClient::enqueue(Request::ptr_t request)
 
 		if( (iter != mRoundRobinQueue.end()) || (iter2 != mUnQueuedRequests.end()) )
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("LLMediaDataClient") << "ALREADY THERE: NOT Queuing request for " << *request << LL_ENDL;
 #endif
 
@@ -779,13 +779,13 @@ void LLObjectMediaDataClient::enqueue(Request::ptr_t request)
 
 	if (is_new)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLMediaDataClient") << "Queuing SORTED request for " << *request << LL_ENDL;
 #endif
 		
 		mQueue.push_back(request);
 		
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLMediaDataClientQueue") << "SORTED queue:" << mQueue << LL_ENDL;
 #endif
 	}
@@ -794,19 +794,19 @@ void LLObjectMediaDataClient::enqueue(Request::ptr_t request)
 		if (mRoundRobinQueue.size() > mMaxRoundRobinQueueSize) 
 		{
 			LL_INFOS_ONCE("LLMediaDataClient") << "RR QUEUE MAXED OUT!!!" << LL_ENDL;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("LLMediaDataClient") << "Not queuing " << *request << LL_ENDL;
 #endif
 			return;
 		}
 				
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLMediaDataClient") << "Queuing RR request for " << *request << LL_ENDL;
 #endif
 		// Push the request on the pending queue
 		mRoundRobinQueue.push_back(request);
 		
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("LLMediaDataClientQueue") << "RR queue:" << mRoundRobinQueue << LL_ENDL;			
 #endif
 	}	
@@ -820,7 +820,7 @@ bool LLObjectMediaDataClient::canServiceRequest(Request::ptr_t request)
 	{
 		if(!request->getObject()->isInterestingEnough())
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("LLMediaDataClient") << "Not fetching " << *request << ": not interesting enough" << LL_ENDL;
 #endif
 			return false;
@@ -871,7 +871,7 @@ bool LLObjectMediaDataClient::processQueueTimer()
     if (isDoneProcessing())
 		return true;
 		
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("LLMediaDataClient") << "started, SORTED queue size is:	  " << mQueue.size() 
 		<< ", RR queue size is:	  " << mRoundRobinQueue.size() << LL_ENDL;
 	LL_DEBUGS("LLMediaDataClientQueue") << "    SORTED queue is:	  " << mQueue << LL_ENDL;
@@ -882,7 +882,7 @@ bool LLObjectMediaDataClient::processQueueTimer()
 
 	sortQueue();
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("LLMediaDataClientQueue") << "after sort, SORTED queue is:	  " << mQueue << LL_ENDL;
 #endif
 	
@@ -891,7 +891,7 @@ bool LLObjectMediaDataClient::processQueueTimer()
 
 	swapCurrentQueue();
 	
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("LLMediaDataClient") << "finished, SORTED queue size is:	  " << mQueue.size() 
 		<< ", RR queue size is:	  " << mRoundRobinQueue.size() << LL_ENDL;
 	LL_DEBUGS("LLMediaDataClientQueue") << "    SORTED queue is:	  " << mQueue << LL_ENDL;
diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp
index be7ae70e973..864451bb750 100644
--- a/indra/newview/llpanelland.cpp
+++ b/indra/newview/llpanelland.cpp
@@ -200,7 +200,7 @@ void LLPanelLandInfo::refresh()
 		}
 		else
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS() << "Invalid selection for joining land" << LL_ENDL;
 #endif
 			mButtonJoinLand->setEnabled(FALSE);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 780f7c5684f..7a2fc3708da 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -781,7 +781,7 @@ F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera)
 		dist = eye.getLength3().getF32();
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("RiggedBox") << "calcDistance, group " << group << " camera " << origin << " obj bounds " 
                            << group->mObjectBounds[0] << ", " << group->mObjectBounds[1] 
                            << " dist " << dist << " radius " << group->mRadius << LL_ENDL;
@@ -841,7 +841,7 @@ BOOL LLSpatialGroup::changeLOD()
 
 		if (fabsf(ratio) >= getSpatialPartition()->mSlopRatio)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("RiggedBox") << "changeLOD true because of ratio compare "
                                    << fabsf(ratio) << " " << getSpatialPartition()->mSlopRatio << LL_ENDL;
             LL_DEBUGS("RiggedBox") << "sg " << this << "\nmDistance " << mDistance
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index c3821175a02..94891da2f59 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1157,7 +1157,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 	{
 		if (mState == INIT || mState == LOAD_FROM_NETWORK || mState == LOAD_FROM_SIMULATOR)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_TXT) << mID << " abort: mImagePriority < F_ALMOST_ZERO" << LL_ENDL;
 #endif
 			return true; // abort
@@ -1212,7 +1212,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 		setState(LOAD_FROM_TEXTURE_CACHE);
 		mInCache = FALSE;
 		mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE); // min desired size is TEXTURE_CACHE_ENTRY_SIZE
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS(LOG_TXT) << mID << ": Priority: " << llformat("%8.0f",mImagePriority)
 						   << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
 #endif
@@ -1285,7 +1285,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 				//
 				//This should never happen
 				//
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS(LOG_TXT) << mID << " this should never happen" << LL_ENDL;
 #endif
 				return false;
@@ -1314,7 +1314,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 			setState(DECODE_IMAGE);
 			mInCache = TRUE;
 			mWriteToCacheState = NOT_WRITE ;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_TXT) << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
 							   << " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight())
 							   << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
@@ -1332,7 +1332,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 			// need more data
 			else
 			{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS(LOG_TXT) << mID << ": Not in Cache" << LL_ENDL;
 #endif
 				setState(LOAD_FROM_NETWORK);
@@ -1381,7 +1381,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 					}
 					absl::StrAppend(&http_url, "/?texture_id=", mID.asString());
 					setUrl(std::move(http_url));
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS(LOG_TXT) << "Texture URL: " << mUrl << LL_ENDL;
 #endif
 					mWriteToCacheState = CAN_WRITE ; //because this texture has a fixed texture id.
@@ -1389,7 +1389,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 				else
 				{
 					mCanUseHTTP = false ;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS(LOG_TXT) << "Texture not available via HTTP: empty URL." << LL_ENDL;
 #endif
 				}
@@ -1398,7 +1398,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 			{
 				// This will happen if not logged in or if a region deoes not have HTTP Texture enabled
 				//LL_WARNS(LOG_TXT) << "Region not found for host: " << mHost << LL_ENDL;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS(LOG_TXT) << "Texture not available via HTTP: no region " << mUrl << LL_ENDL;
 #endif
 				mCanUseHTTP = false;
@@ -1468,7 +1468,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
                 }
             }
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_TXT) << mID << ": Loaded from Sim. Bytes: " << mFormattedImage->getDataSize() << LL_ENDL;
 #endif
 			mFetcher->removeFromNetworkQueue(this, false);
@@ -1607,7 +1607,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 		mLoaded = FALSE;
 		mGetStatus = LLCore::HttpStatus();
 		mGetReason.clear();
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS(LOG_TXT) << "HTTP GET: " << mID << " Offset: " << mRequestedOffset
 						   << " Bytes: " << mRequestedSize
 						   << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth
@@ -1886,7 +1886,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 		{
 			// We aborted, don't decode
 			setState(DONE);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_TXT) << mID << " DECODE_IMAGE abort: desired discard " << mDesiredDiscard << "<0" << LL_ENDL;
 #endif
 			return true;
@@ -1898,7 +1898,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 			
 			//abort, don't decode
 			setState(DONE);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_TXT) << mID << " DECODE_IMAGE abort: (mFormattedImage->getDataSize() <= 0)" << LL_ENDL;
 #endif
 			return true;
@@ -1909,7 +1909,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 
 			//abort, don't decode
 			setState(DONE);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_TXT) << mID << " DECODE_IMAGE abort: mLoadedDiscard < 0" << LL_ENDL;
 #endif
 			return true;
@@ -1922,7 +1922,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 		U32 image_priority = LLWorkerThread::PRIORITY_NORMAL | mWorkPriority;
 		mDecoded  = FALSE;
 		setState(DECODE_IMAGE_UPDATE);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS(LOG_TXT) << mID << ": Decoding. Bytes: " << mFormattedImage->getDataSize() << " Discard: " << discard
 						   << " All Data: " << mHaveAllData << LL_ENDL;
 #endif
@@ -1947,7 +1947,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 				if (mCachedSize > 0 && !mInLocalCache && mRetryAttempt == 0)
 				{
 					// Cache file should be deleted, try again
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
  					LL_DEBUGS(LOG_TXT) << mID << ": Decode of cached file failed (removed), retrying" << LL_ENDL;
 #endif
 					llassert_always(mDecodeHandle == 0);
@@ -1959,7 +1959,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 				}
 				else
 				{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS(LOG_TXT) << "Failed to Decode image " << mID << " after " << mRetryAttempt << " retries" << LL_ENDL;
 #endif
 					setState(DONE); // failed
@@ -1968,7 +1968,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 			else
 			{
 				llassert_always(mRawImage.notNull());
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS(LOG_TXT) << mID << ": Decoded. Discard: " << mDecodedDiscard
 								   << " Raw Image: " << llformat("%dx%d",mRawImage->getWidth(),mRawImage->getHeight()) << LL_ENDL;
 #endif
@@ -2048,7 +2048,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
 		{
 			// More data was requested, return to INIT
 			setState(INIT);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_TXT) << mID << " more data requested, returning to INIT: " 
 							   << " mDecodedDiscard " << mDecodedDiscard << ">= 0 && mDesiredDiscard " << mDesiredDiscard
 							   << "<" << " mDecodedDiscard " << mDecodedDiscard << LL_ENDL;
@@ -2127,7 +2127,7 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
 	
 	std::string reason(status.toString());
 	setGetStatus(status, reason);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS(LOG_TXT) << "HTTP COMPLETE: " << mID
 					   << " status: " << status.toTerseString()
 					   << " '" << reason << "'"
@@ -2374,7 +2374,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
 		LLCore::BufferArray * body(response->getBody());
 		data_size = body ? body->size() : 0;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS(LOG_TXT) << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL;
 #endif
 		if (data_size > 0)
@@ -2528,7 +2528,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag
 		mRawImage = raw;
 		mAuxImage = aux;
 		mDecodedDiscard = mFormattedImage->getDiscardLevel();
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
  		LL_DEBUGS(LOG_TXT) << mID << ": Decode Finished. Discard: " << mDecodedDiscard
 						   << " Raw Image: " << llformat("%dx%d",mRawImage->getWidth(),mRawImage->getHeight()) << LL_ENDL;
 #endif
@@ -2705,7 +2705,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
 		return false;
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	if (f_type == FTT_SERVER_BAKE)
 	{
 		LL_DEBUGS("Avatar") << " requesting " << id << " " << w << "x" << h << " discard " << desired_discard << " type " << f_type << LL_ENDL;
@@ -2734,7 +2734,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
 		llassert(!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C));
 
 		// Do full requests for baked textures to reduce interim blurring.
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS(LOG_TXT) << "full request for " << id << " texture is FTT_SERVER_BAKE" << LL_ENDL;
 #endif
 		desired_size = MAX_IMAGE_DATA_SIZE;
@@ -2742,7 +2742,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
 	}
 	else if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C))
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS(LOG_TXT) << "full request for " << id << " exten is not J2C: " << exten << LL_ENDL;
 #endif
 		// Only do partial requests for J2C at the moment
@@ -2814,7 +2814,7 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const
 		worker->unlockWorkMutex();										// -Mw
 	}
 	
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
  	LL_DEBUGS(LOG_TXT) << "REQUESTED: " << id << " f_type " << fttype_to_string(f_type)
 					   << " Discard: " << desired_discard << " size " << desired_size << LL_ENDL;
 #endif
@@ -3030,7 +3030,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
             worker->mDecodeTimer.reset();
             worker->mFetchTimer.reset();
 			res = true;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_TXT) << id << ": Request Finished. State: " << worker->mState << " Discard: " << discard_level << LL_ENDL;
 #endif
 			worker->unlockWorkMutex();									// -Mw
@@ -4006,7 +4006,7 @@ class AssetReportHandler : public LLCore::HttpHandler
 
 		if (status)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_TXT) << "Successfully delivered asset metrics to grid."
 							   << LL_ENDL;
 #endif
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp
index b6e9839bfbc..9bf94868c18 100644
--- a/indra/newview/lltool.cpp
+++ b/indra/newview/lltool.cpp
@@ -103,7 +103,7 @@ BOOL LLTool::handleMouseUp(S32 x, S32 y, MASK mask)
 BOOL LLTool::handleHover(S32 x, S32 y, MASK mask)
 {
 	gViewerWindow->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("UserInput") << "hover handled by a tool" << LL_ENDL;		
 #endif
 	// by default, do nothing, say we handled it
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index 8cf83dd4200..820d76b6092 100644
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -405,7 +405,7 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
 
 BOOL LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask )
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("UserInput") << "hover handled by LLToolBrushLand ("
 								<< (hasMouseCapture() ? "active":"inactive")
 								<< ")" << LL_ENDL;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 00703d4fe2d..806fd523c6d 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -551,7 +551,7 @@ BOOL LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask )
 	ECursorType cursor = acceptanceToCursor(acceptance);
 	gViewerWindow->getWindow()->setCursor( cursor );
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("UserInput") << "hover handled by LLToolDragAndDrop" << LL_ENDL;
 #endif
 	return TRUE;
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 772be1509a9..f5789948c06 100644
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -356,7 +356,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
 	{
 		if (!mValidClickPoint)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [invalid point]" << LL_ENDL;
 #endif
 			gViewerWindow->setCursor(UI_CURSOR_NO);
@@ -385,7 +385,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
 
 				gViewerWindow->moveCursorToCenter();
 			}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [active]" << LL_ENDL;
 #endif
 		}
@@ -415,7 +415,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
 
 				gViewerWindow->moveCursorToCenter();
 			}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolPan" << LL_ENDL;
 #endif
 		}
@@ -449,7 +449,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
 				gViewerWindow->moveCursorToCenter();
 			}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolZoom" << LL_ENDL;	
 #endif
 		}
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 732cd29a8d3..ad8d009cc5b 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -762,7 +762,7 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask)
 	// HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover.  This is actually a no-op since the cursor is hidden.
 	gViewerWindow->setCursor(UI_CURSOR_ARROW);  
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (active) [cursor hidden]" << LL_ENDL;	
 #endif
 }
@@ -929,7 +929,7 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
 void LLToolGrabBase::handleHoverInactive(S32 x, S32 y, MASK mask)
 {
 	// JC - TODO - change cursor based on gGrabBtnVertical, gGrabBtnSpin
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (inactive-not over editable object)" << LL_ENDL;		
 #endif
 	gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
@@ -941,7 +941,7 @@ void LLToolGrabBase::handleHoverFailed(S32 x, S32 y, MASK mask)
 	if( GRAB_NOOBJECT == mMode )
 	{
 		gViewerWindow->setCursor(UI_CURSOR_NO);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (not on object)" << LL_ENDL;	
 #endif
 	}
@@ -956,7 +956,7 @@ void LLToolGrabBase::handleHoverFailed(S32 x, S32 y, MASK mask)
 			{
 			case GRAB_LOCKED:
 				gViewerWindow->setCursor(UI_CURSOR_GRABLOCKED);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed, no move permission)" << LL_ENDL;		
 #endif
 				break;
@@ -973,7 +973,7 @@ void LLToolGrabBase::handleHoverFailed(S32 x, S32 y, MASK mask)
 		else
 		{
 			gViewerWindow->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolGrab (grab failed but within slop)" << LL_ENDL;		
 #endif
 		}
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index fdf4d7f8d03..5c6bb60e939 100644
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -147,11 +147,11 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
 			gViewerWindow->hideCursor();
 		}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLToolGun (mouselook)" << LL_ENDL;
 #endif
 	}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	else
 	{
 		LL_DEBUGS("UserInput") << "hover handled by LLToolGun (not mouselook)" << LL_ENDL;
@@ -241,4 +241,4 @@ void LLToolGun::draw()
 			(windowWidth - mCrosshairp->getWidth()) / 2,
 			(windowHeight - mCrosshairp->getHeight()) / 2, crosshair_color);
 	}
-}
\ No newline at end of file
+}
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 3e43fac0ae1..c9e0fd7a159 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -825,7 +825,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
 		// could disable it here.
 		show_highlight = true;
 		// cursor set by media object
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
 #endif
 	}
@@ -866,7 +866,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
 			show_highlight = true;
 			ECursorType cursor = cursorFromObject(click_action_object);
 			gViewerWindow->setCursor(cursor);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
 #endif
 		}
@@ -882,7 +882,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
 		{
 			show_highlight = true;
 			gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
 #endif
 		}
@@ -891,14 +891,14 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
 		{
 			show_highlight = true;
 			gViewerWindow->setCursor(UI_CURSOR_HAND);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
 #endif
 		}
 		else
 		{
 			gViewerWindow->setCursor(UI_CURSOR_ARROW);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
 #endif
 		}
diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp
index b87659ad369..4ce23a59d4e 100644
--- a/indra/newview/lltoolplacer.cpp
+++ b/indra/newview/lltoolplacer.cpp
@@ -545,7 +545,7 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask)
 
 BOOL LLToolPlacer::handleHover(S32 x, S32 y, MASK mask)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("UserInput") << "hover handled by LLToolPlacer" << LL_ENDL;	
 #endif
 	gViewerWindow->setCursor(UI_CURSOR_TOOLCREATE);
diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp
index a918905ac27..b2fa71164af 100644
--- a/indra/newview/lltoolselectland.cpp
+++ b/indra/newview/lltoolselectland.cpp
@@ -168,7 +168,7 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
 				roundXY(mWestSouthBottom);
 				roundXY(mEastNorthTop);
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, land)" << LL_ENDL;
 #endif
 				gViewerWindow->setCursor(UI_CURSOR_ARROW);
@@ -176,7 +176,7 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
 			else
 			{
 				mDragEndValid = FALSE;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, no land)" << LL_ENDL;
 #endif
 				gViewerWindow->setCursor(UI_CURSOR_NO);
@@ -187,7 +187,7 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
 		}
 		else
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, in slop)" << LL_ENDL;
 #endif
 			gViewerWindow->setCursor(UI_CURSOR_ARROW);
@@ -195,7 +195,7 @@ BOOL LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask)
 	}
 	else
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (inactive)" << LL_ENDL;	
 #endif
 		gViewerWindow->setCursor(UI_CURSOR_ARROW);
diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp
index 1e27f981fd0..202c5b99f95 100644
--- a/indra/newview/lltoolselectrect.cpp
+++ b/indra/newview/lltoolselectrect.cpp
@@ -145,11 +145,11 @@ BOOL LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask)
 			return LLToolSelect::handleHover(x, y, mask);
 		}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (active)" << LL_ENDL;		
 #endif
 	}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	else
 	{
 		LL_DEBUGS("UserInput") << "hover handled by LLToolSelectRect (inactive)" << LL_ENDL;		
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 47601f31950..d2fa1672701 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -151,7 +151,7 @@ void LLViewerAssetStorage::storeAssetData(
     F64Seconds timeout)
 {
     LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy) " << tid << ":" << LLAssetType::lookup(asset_type)
                               << " ASSET_ID: " << asset_id << LL_ENDL;
 #endif
@@ -290,7 +290,7 @@ void LLViewerAssetStorage::storeAssetData(
     }
     
     LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << LL_ENDL;
 
     LL_DEBUGS("AssetStorage") << "ASSET_ID: " << asset_id << LL_ENDL;
@@ -401,7 +401,7 @@ void LLViewerAssetStorage::queueRequestHttp(
     BOOL duplicate,
     BOOL is_priority)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("ViewerAsset") << "Request asset via HTTP " << uuid << " type " << LLAssetType::lookup(atype) << LL_ENDL;
 #endif
 
@@ -511,7 +511,7 @@ void LLViewerAssetStorage::assetRequestCoro(
 		return;
     }
     std::string url = getAssetURL(mViewerAssetUrl, uuid,atype);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("ViewerAsset") << "request url: " << url << LL_ENDL;
 #endif
 
@@ -535,7 +535,7 @@ void LLViewerAssetStorage::assetRequestCoro(
     LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
     if (!status)
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("ViewerAsset") << "request failed, status " << status.toTerseString() << LL_ENDL;
 #endif
         result_code = LL_ERR_ASSET_REQUEST_FAILED;
@@ -543,7 +543,7 @@ void LLViewerAssetStorage::assetRequestCoro(
     }
     else
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("ViewerAsset") << "request succeeded, url " << url << LL_ENDL;
 #endif
 
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index a4139a4350e..fdc528e0e24 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -113,7 +113,7 @@ class LLLocalizedInventoryItemsDictionary final : public LLSingleton<LLLocalized
 	 */
 	bool localizeInventoryObjectName(std::string& object_name)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS(LOG_LOCAL) << "Searching for localization: " << object_name << LL_ENDL;
 #endif
 
@@ -123,7 +123,7 @@ class LLLocalizedInventoryItemsDictionary final : public LLSingleton<LLLocalized
 		if(found)
 		{
 			object_name = dictionary_iter->second;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS(LOG_LOCAL) << "Found, new name is: " << object_name << LL_ENDL;
 #endif
 		}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 7b5a3f32ebf..7664cdbc990 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -913,7 +913,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
 		proximity_order[i]->mProximity = i;
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("PluginPriority") << "Total reported CPU usage is " << total_cpu << LL_ENDL;
 #endif
 
@@ -2799,13 +2799,13 @@ void LLViewerMediaImpl::update()
 			// This media may need to be loaded.
 			if(sMediaCreateTimer.hasExpired())
 			{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("PluginPriority") << this << ": creating media based on timer expiration" << LL_ENDL;
 #endif
 				createMediaSource();
 				sMediaCreateTimer.setTimerExpirySec(LLVIEWERMEDIA_CREATE_DELAY);
 			}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			else
 			{
 				LL_DEBUGS("PluginPriority") << this << ": NOT creating media (waiting on timer)" << LL_ENDL;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 0aed3440c51..cff054289ef 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4342,7 +4342,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
 	S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList);
 	S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList);
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Messaging", "Motion") << "Processing " << num_blocks << " Animations" << LL_ENDL;
 #endif
 
@@ -4396,13 +4396,13 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
 						avatarp->mAnimationSources.insert(LLVOAvatar::AnimationSourceMap::value_type(object_id, animation_id));
 					}
 				}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("Messaging", "Motion") << "Anim sequence ID: " << anim_sequence_id
 									<< " Animation id: " << animation_id
 									<< " From block: " << object_id << LL_ENDL;
 #endif
 			}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			else
 			{
 				LL_DEBUGS("Messaging", "Motion") << "Anim sequence ID: " << anim_sequence_id
@@ -4436,13 +4436,13 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
 	
 	mesgsys->getUUIDFast(_PREHASH_Sender, _PREHASH_ID, uuid);
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("AnimatedObjectsNotify") << "Received animation state for object " << uuid << LL_ENDL;
 #endif
 
     signaled_animation_map_t signaled_anims;
 	S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("AnimatedObjectsNotify") << "processing object animation requests, num_blocks " << num_blocks << " uuid " << uuid << LL_ENDL;
 #endif
     for( S32 i = 0; i < num_blocks; i++ )
@@ -4450,7 +4450,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
         mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i);
         mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i);
         signaled_anims[animation_id] = anim_sequence_id;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AnimatedObjectsNotify") << "added signaled_anims animation request for object " 
                                     << uuid << " animation id " << animation_id << LL_ENDL;
 #endif
@@ -4460,7 +4460,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
     LLViewerObject *objp = gObjectList.findObject(uuid);
     if (!objp)
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AnimatedObjectsNotify") << "Received animation state for unknown object " << uuid << LL_ENDL;
 #endif
         return;
@@ -4469,7 +4469,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
 	LLVOVolume *volp = objp->asVolume();
     if (!volp)
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AnimatedObjectsNotify") << "Received animation state for non-volume object " << uuid << LL_ENDL;
 #endif
         return;
@@ -4477,7 +4477,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
 
     if (!volp->isAnimatedObject())
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("AnimatedObjectsNotify") << "Received animation state for non-animated object " << uuid << LL_ENDL;
 #endif
         return;
@@ -4487,7 +4487,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
     LLControlAvatar *avatarp = volp->getControlAvatar();
     if (!avatarp)
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AnimatedObjectsNotify") << "Received animation request for object with no control avatar, ignoring " << uuid << LL_ENDL;
 #endif
         return;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 8f7f3622d08..755292c4db1 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -155,7 +155,7 @@ static LLTrace::BlockTimerStatHandle FTM_CREATE_OBJECT("Create Object");
 // static
 LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, S32 flags)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("ObjectUpdate") << "creating " << id << LL_ENDL;
     dumpStack("ObjectUpdateStack");
 #endif
@@ -1129,7 +1129,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
 					 const EObjectUpdateType update_type,
 					 LLDataPacker *dp)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS_ONCE("SceneLoadTiming") << "Received viewer object data" << LL_ENDL;
 
     LL_DEBUGS("ObjectUpdate") << " mesgsys " << mesgsys << " dp " << dp << " id " << getID() << " update_type " << (S32) update_type << LL_ENDL;
@@ -2702,7 +2702,7 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& frame_tim
 			{
 				// Was clipped, so this means we hit a edge where there is no region to enter
 				LLVector3 clip_pos = mRegionp->getPosRegionFromGlobal(clip_pos_global);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("Interpolate") << "Hit empty region edge, clipped predicted position to "
 										 << clip_pos
 										 << " from " << new_pos << LL_ENDL;
@@ -2724,7 +2724,7 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& frame_tim
 					// Workaround: we can't accurately figure out time when we cross border
 					// so just write down time 'after the fact', it is far from optimal in
 					// case of lags, but for lags sMaxUpdateInterpolationTime will kick in first
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("Interpolate") << "Predicted region crossing, new position " << new_pos << LL_ENDL;
 #endif
 					mRegionCrossExpire = frame_time + sMaxRegionCrossingInterpolationTime;
@@ -2733,7 +2733,7 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& frame_tim
 				{
 					// Predicting crossing over 1s, stop motion
 					// Stop motion
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("Interpolate") << "Predicting region crossing for too long, stopping at " << new_pos << LL_ENDL;
 #endif
 					new_v.clear();
@@ -3133,7 +3133,7 @@ void LLViewerObject::updateControlAvatar()
     if (should_have_control_avatar && !has_control_avatar)
     {
         std::string vobj_name = llformat("Vol%p", root);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AnimatedObjects") << vobj_name << " calling linkControlAvatar()" << LL_ENDL;
 #endif
         root->linkControlAvatar();
@@ -3141,7 +3141,7 @@ void LLViewerObject::updateControlAvatar()
     if (!should_have_control_avatar && has_control_avatar)
     {
         std::string vobj_name = llformat("Vol%p", root);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AnimatedObjects") << vobj_name << " calling unlinkControlAvatar()" << LL_ENDL;
 #endif
         root->unlinkControlAvatar();
@@ -3167,7 +3167,7 @@ void LLViewerObject::linkControlAvatar()
             return;
         }
         mControlAvatar = LLControlAvatar::createControlAvatar(volp);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AnimatedObjects") << volp->getID() 
                                      << " created control av for " 
                                      << (S32) (1+volp->numChildren()) << " prims" << LL_ENDL;
@@ -5246,7 +5246,7 @@ S32 LLViewerObject::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID
 	}
 	//else if (pMaterialID != tep->getMaterialID())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Material") << "Changing texture entry for te " << (S32)te
 							 << ", object " << mID
 							 << ", material " << pMaterialID
@@ -5269,7 +5269,7 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri
 	}
 
 	retval = LLPrimitive::setTEMaterialParams(te, pMaterialParams);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Material") << "Changing material params for te " << (S32)te
 							<< ", object " << mID
 			               << " (" << retval << ")"
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index c5a0d8a72dd..8603b2351af 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -242,7 +242,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
 	}
 
 	// ignore returned flags
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("ObjectUpdate") << "uuid " << objectp->mID << " calling processUpdateMessage " 
                               << objectp << " just_created " << just_created << " from_cache " << from_cache << " msg " << msg << LL_ENDL;
     dumpStack("ObjectUpdateStack");
@@ -360,7 +360,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry*
 	{
 		objectp = createObjectFromCache(pcode, regionp, fullid, entry->getLocalID());
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " created objectp " << objectp << LL_ENDL;
         dumpStack("ObjectUpdateStack");
 #endif
@@ -483,7 +483,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
 			compressed_dp.reset();
 
 			uncompressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("ObjectUpdate") << "got binary data from message to compressed_dpbuffer" << LL_ENDL;
 #endif
 			mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i, 2048);
@@ -526,7 +526,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
 								 gMessageSystem->getSenderPort());
 				if (fullid.isNull())
 				{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << ":" << gMessageSystem->getSenderPort() << LL_ENDL;
 #endif
 					mNumUnknownUpdates++;
@@ -547,7 +547,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
 				// LL_WARNS() << "update for unknown localid " << local_id << " host " << gMessageSystem->getSender() << LL_ENDL;
 				mNumUnknownUpdates++;
 			}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             else
             {
                 LL_DEBUGS("ObjectUpdate") << "Non-full, non-compressed update, obj " << local_id << ", global ID " << fullid << " from " << mesgsys->getSender() << LL_ENDL;
@@ -561,13 +561,13 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
 			mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
 			msg_size += sizeof(LLUUID);
 			msg_size += sizeof(U32);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("ObjectUpdate") << "Full Update, obj " << local_id << ", global ID " << fullid << " from " << mesgsys->getSender() << LL_ENDL;
 #endif
 		}
 		objectp = findObject(fullid);
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         if (compressed)
         {
             LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " received compressed data from message (earlier in function)" << LL_ENDL;
@@ -653,7 +653,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
 
 			objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender());
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("ObjectUpdate") << "creating object " << fullid << " result " << objectp << LL_ENDL;
             dumpStack("ObjectUpdateStack");
 #endif
@@ -753,7 +753,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
 		mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
 		msg_size += sizeof(U32) * 2;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("ObjectUpdate") << "got probe for id " << id << " crc " << crc << LL_ENDL;
         dumpStack("ObjectUpdateStack");
 #endif
@@ -763,7 +763,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
 		if(!regionp->probeCache(id, crc, flags, cache_miss_type))
 		{
 			// Cache Miss.
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("ObjectUpdate") << "cache miss for id " << id << " crc " << crc << " miss type " << (S32) cache_miss_type << LL_ENDL;
 #endif
 
@@ -1358,7 +1358,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
 	// Cleanup any references we have to this object
 	// Remove from object map so noone can look it up.
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("ObjectUpdate") << " dereferencing id " << objectp->mID << LL_ENDL;
     dumpStack("ObjectUpdateStack");
 #endif
@@ -2073,7 +2073,7 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L
 {
 	llassert_always(uuid.notNull());
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("ObjectUpdate") << "creating " << uuid << " local_id " << local_id << LL_ENDL;
     dumpStack("ObjectUpdateStack");
 #endif
@@ -2112,7 +2112,7 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
 		fullid = uuid;
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("ObjectUpdate") << "createObject creating " << fullid << LL_ENDL;
     dumpStack("ObjectUpdateStack");
 #endif
@@ -2173,7 +2173,7 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const
 
 void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("ORPHANS") << "Orphaning object " << childp->getID() << " with parent " << parent_id << LL_ENDL;
 #endif
 
@@ -2269,7 +2269,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
 				continue;
 			}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("ORPHANS") << "Reunited parent " << objectp->mID 
 				<< " with child " << childp->mID << LL_ENDL;
 			LL_DEBUGS("ORPHANS") << "Glob: " << objectp->getPositionGlobal() << LL_ENDL;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 83e5d8b7b85..24dff96879e 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2481,7 +2481,7 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
 		// we've seen this object before
 		if (entry->getCRC() == crc)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("AnimatedObjects") << " got dupe for local_id " << local_id << LL_ENDL;
             dumpStack("AnimatedObjectsStack");
 #endif
@@ -2492,7 +2492,7 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
 		}
 		else //CRC changed
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("AnimatedObjects") << " got update for local_id " << local_id << LL_ENDL;
             dumpStack("AnimatedObjectsStack");
 #endif
@@ -2507,7 +2507,7 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
 	}
 	else
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AnimatedObjects") << " got first notification for local_id " << local_id << LL_ENDL;
         dumpStack("AnimatedObjectsStack");
 #endif
@@ -2684,7 +2684,7 @@ void LLViewerRegion::requestCacheMisses()
 		msg->addU8Fast(_PREHASH_CacheMissType, (*iter).mType);
 		msg->addU32Fast(_PREHASH_ID, (*iter).mID);
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AnimatedObjects") << "Requesting cache missed object " << (*iter).mID << LL_ENDL;
 #endif
         
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 0dbe0521675..302aa3a5a57 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1527,7 +1527,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
 	S32 discard_level = mRawDiscardLevel;
 	if (mRawDiscardLevel < 0)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS() << "Negative raw discard level when creating image: " << mRawDiscardLevel << LL_ENDL;
 #endif
 		discard_level = 0;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index e622ab183a3..b291c973449 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -247,7 +247,7 @@ void LLViewerTextureList::doPrefetchImages()
 			}
 		}
 	}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS() << "fetched " << texture_count << " images from " << filename << LL_ENDL;
 #endif
 }
@@ -312,7 +312,7 @@ void LLViewerTextureList::shutdown()
 		std::string filename = get_texture_list_name();
 		llofstream file;
 		file.open(filename.c_str());
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS() << "saving " << imagelist.size() << " image list entries" << LL_ENDL;
 #endif
 		LLSDSerialize::toPrettyXML(imagelist, file);
@@ -433,7 +433,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
 		{
 			LL_WARNS() << "Requested texture " << new_id << " already exists but does not have a URL" << LL_ENDL;
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		else if (texture->getUrl() != url)
 		{
 			// This is not an error as long as the images really match -
@@ -1250,12 +1250,12 @@ void LLViewerTextureList::decodeAllImages(F32 max_time)
 	}
 	max_time -= timer.getElapsedTimeF32();
 	max_time = llmax(max_time, .001f);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	F32 create_time = 
 #endif
 		updateImagesCreateTextures(max_time);
 	
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("ViewerImages") << "decodeAllImages() took " << timer.getElapsedTimeF32() << " seconds. " 
 	<< " fetch_pending " << fetch_pending
 	<< " create_time " << create_time
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index 0aaa5f7aab6..8b8964560a0 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -290,7 +290,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
 				{
 					mDetailTextures[i]->destroyRawImage() ;
 				}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("Terrain") << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << " Discard: " << ddiscard << LL_ENDL;
 #endif
 				return FALSE;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d4cdbbc16db..eab9d9e2a7b 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1,4 +1,4 @@
-/** 
+/** 
  * @File llvoavatar.cpp
  * @brief Implementation of LLVOAvatar class which is a derivation of LLViewerObject
  *
@@ -2433,7 +2433,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
 			LL_WARNS() << "unable to determine URL for te " << te << " uuid " << uuid << LL_ENDL;
 			return NULL;
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << LL_ENDL;
 #endif
 		result = LLViewerTextureManager::getFetchedTextureFromUrl(
@@ -4945,7 +4945,7 @@ void LLVOAvatar::updateVisibility()
 		}
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     if ( visible != mVisible )
     {
         LL_DEBUGS("AvatarRender") << "visible was " << mVisible << " now " << visible << LL_ENDL;
@@ -6136,7 +6136,7 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
 //-----------------------------------------------------------------------------
 BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Motion") << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
 #endif
 
@@ -6163,7 +6163,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
 		remap_id = remapMotionID(id);
 	}
 	
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	if (remap_id != id)
 	{
 		LL_DEBUGS("Motion") << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL;
@@ -6183,7 +6183,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
 //-----------------------------------------------------------------------------
 BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Motion") << "Motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
 #endif
 
@@ -6210,7 +6210,7 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
 		remap_id = remapMotionID(id);
 	}
 	
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	if (remap_id != id)
 	{
 		LL_DEBUGS("Motion") << "motion resultant " << remap_id.asString() << " " << gAnimLibrary.animationName(remap_id) << LL_ENDL;
@@ -6411,7 +6411,7 @@ void LLVOAvatar::rebuildAttachmentOverrides()
         LLVOVolume *volp = static_cast<LLControlAvatar*>(this)->mRootVolp;
         if (volp)
         {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("Avatar") << volp->getID() << " adding attachment overrides for root vol, prim count " 
                                 << (S32) (1+volp->numChildren()) << LL_ENDL;
 #endif
@@ -6463,7 +6463,7 @@ void LLVOAvatar::updateAttachmentOverrides()
 		LLVOVolume *volp = control_av->mRootVolp;
         if (volp)
         {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("Avatar") << volp->getID() << " adding attachment overrides for root vol, prim count " 
                                 << (S32) (1+volp->numChildren()) << LL_ENDL;
 #endif
@@ -8091,13 +8091,13 @@ void LLVOAvatar::startPhase(const std::string& phase_name)
 	{
 		if (!completed)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("Avatar") << avString() << "no-op, start when started already for " << phase_name << LL_ENDL;
 #endif
 			return;
 		}
 	}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Avatar") << "started phase " << phase_name << LL_ENDL;
 #endif
 	getPhases().startPhase(phase_name);
@@ -8114,11 +8114,11 @@ void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check)
 			getPhases().stopPhase(phase_name);
 			completed = true;
 			logMetricsTimerRecord(phase_name, elapsed, completed);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("Avatar") << avString() << "stopped phase " << phase_name << " elapsed " << elapsed << LL_ENDL;
 #endif
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		else
 		{
 			if (err_check)
@@ -8128,7 +8128,7 @@ void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check)
 		}
 #endif
 	}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	else
 	{
 		if (err_check)
@@ -9344,13 +9344,13 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
 			&& mBakedTextureDatas[baked_index].mLastTextureID != IMG_DEFAULT
 			&& baked_index != BAKED_SKIRT && baked_index != BAKED_LEFT_ARM && baked_index != BAKED_LEFT_LEG && baked_index != BAKED_AUX1 && baked_index != BAKED_AUX2 && baked_index != BAKED_AUX3)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << LL_ENDL;
 #endif
 			setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, 
 				LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		else
 		{
 			LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using texture id "
@@ -9438,7 +9438,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
 	else
 	{
 		// AvatarAppearance message arrived without visual params
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Avatar") << avString() << "no visual params" << LL_ENDL;
 #endif
 
@@ -9463,7 +9463,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
 		// Got an update for some other avatar
 		// Ignore updates for self, because we have a more authoritative value in the preferences.
 		setHoverOffset(contents.mHoverOffset);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Avatar") << avString() << "setting hover to " << contents.mHoverOffset[2] << LL_ENDL;
 #endif
 	}
@@ -9769,7 +9769,7 @@ void dump_sequential_xml(const std::string outprefix, const LLSD& content)
 	std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
 	llofstream ofs(fullpath.c_str(), std::ios_base::out);
 	ofs << LLSDOStreamer<LLSDXMLFormatter>(content, LLSDFormatter::OPTIONS_PRETTY);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL;
 #endif
 }
@@ -10110,7 +10110,7 @@ void LLVOAvatar::cullAvatarsByPixelArea()
 		if (inst->mCulled != culled)
 		{
 			inst->mCulled = culled;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS() << "avatar " << inst->getID() << (culled ? " start culled" : " start not culled" ) << LL_ENDL;
 #endif
 			inst->updateMeshTextures();
@@ -10338,7 +10338,7 @@ void LLVOAvatar::updateRiggingInfo()
 {
     LL_RECORD_BLOCK_TIME(FTM_AVATAR_RIGGING_INFO_UPDATE);
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("RigSpammish") << getFullname() << " updating rig tab" << LL_ENDL;
 #endif
 
@@ -10490,7 +10490,7 @@ const U32 LLVOAvatar::NON_IMPOSTORS_MAX_SLIDER = 66; /* Must equal the maximum a
 // static
 void LLVOAvatar::updateImpostorRendering(U32 newMaxNonImpostorsValue)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	U32  oldmax = sMaxNonImpostors;
 	bool oldflg = sLimitNonImpostors;
 #endif
@@ -10505,7 +10505,7 @@ void LLVOAvatar::updateImpostorRendering(U32 newMaxNonImpostorsValue)
 	}
 	// the sLimitNonImpostors flag depends on whether or not sMaxNonImpostors is set to the no-limit value (0)
 	sLimitNonImpostors = (0 != sMaxNonImpostors);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     if ( oldflg != sLimitNonImpostors )
     {
         LL_DEBUGS("AvatarRender")
@@ -10617,7 +10617,7 @@ void LLVOAvatar::idleUpdateDebugInfo()
 
 void LLVOAvatar::updateVisualComplexity()
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("AvatarRender") << "avatar " << getID() << " appearance changed" << LL_ENDL;
 #endif
 	// Set the cache time to in the past so it's updated ASAP
@@ -10675,7 +10675,7 @@ void LLVOAvatar::accountRenderComplexityForObject(
 								attachment_texture_cost += volume_texture.second;
 							}
                             attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
                             LL_DEBUGS("ARCdetail") << "Attachment costs " << attached_object->getAttachmentItemID()
                                                    << " total: " << attachment_total_cost
                                                    << ", volume: " << attachment_volume_cost
@@ -10789,7 +10789,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
 				}
 			}
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("ARCdetail") << "Avatar body parts complexity: " << cost << LL_ENDL;
 #endif
 
@@ -10825,7 +10825,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
 		// Diagnostic output to identify all avatar-related textures.
 		// Does not affect rendering cost calculation.
 		// Could be wrapped in a debug option if output becomes problematic.
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		static bool arch_detail_dbg_log = debugLoggingEnabled("ARCdetail");
 		if (isSelf() && arch_detail_dbg_log)
 		{
@@ -11140,7 +11140,7 @@ void LLVOAvatar::calcMutedAVColor()
 
     if (mMutedAVColor != new_color) 
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AvatarRender") << "avatar "<< av_id << change_msg << std::setprecision(3) << new_color << LL_ENDL;
 #endif
         mMutedAVColor = new_color;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index aa46ab5dfb2..e7c9086b73c 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -278,18 +278,18 @@ bool LLVOAvatarSelf::checkStuckAppearance()
 	
 	if (gAgentWearables.isCOFChangeInProgress())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Avatar") << "checking for stuck appearance" << LL_ENDL;
 #endif
 		F32 change_time = gAgentWearables.getCOFChangeTime();
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Avatar") << "change in progress for " << change_time << " seconds" << LL_ENDL;
 
 		S32 active_hp = LLAppearanceMgr::instance().countActiveHoldingPatterns();
 		LL_DEBUGS("Avatar") << "active holding patterns " << active_hp << " seconds" << LL_ENDL;
 #endif
 		S32 active_copies = LLAppearanceMgr::instance().getActiveCopyOperations();
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Avatar") << "active copy operations " << active_copies << LL_ENDL;
 #endif
 
@@ -2043,7 +2043,7 @@ bool LLVOAvatarSelf::getIsCloud() const
 				return true;
 			}
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS() << "Avatar de-clouded" << LL_ENDL;
 #endif
 	}
@@ -2281,7 +2281,7 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url)
 
     mPendingTimerRecords.clear();
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("Avatar") << avString() << "message: " << ll_pretty_print_sd(msg) << LL_ENDL;
 #endif
 
@@ -2617,7 +2617,7 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
 
 void LLVOAvatarSelf::outputRezTiming(const std::string& msg) const
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Avatar")
 		<< avString()
 		<< llformat("%s. Time from avatar creation: %.2f", msg.c_str(), mDebugSelfLoadTimer.getElapsedTimeF32())
@@ -2815,7 +2815,7 @@ void LLVOAvatarSelf::sendHoverHeight() const
 		const LLVector3& hover_offset = getHoverOffset();
 		update["hover_height"] = hover_offset[2];
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Avatar") << avString() << "sending hover height value " << hover_offset[2] << LL_ENDL;
 #endif
 
@@ -2872,7 +2872,7 @@ void LLVOAvatarSelf::deleteScratchTextures()
 
 	if( sScratchTexBytes.value() )
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS() << "Clearing Scratch Textures " << (S32Kilobytes)sScratchTexBytes << LL_ENDL;
 #endif
 
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index f2806541a31..039ce1fe8af 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -648,7 +648,7 @@ void LLVoiceChannelGroup::voiceCallCapCoro(std::string url)
 
     result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LLSD::map_const_iterator iter;
     for (iter = result.beginMap(); iter != result.endMap(); ++iter)
     {
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 22037f6e7b0..8bf16e86856 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -6759,7 +6759,7 @@ void LLVivoxVoiceClient::enablePreviewBuffer(bool enable)
 
 	if(mCaptureBufferMode && mIsInChannel)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Voice") << "no channel" << LL_ENDL;
 #endif
 		sessionTerminate();
@@ -6770,7 +6770,7 @@ void LLVivoxVoiceClient::recordPreviewBuffer()
 {
 	if (!mCaptureBufferMode)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Voice") << "Not in voice effect preview mode, cannot start recording." << LL_ENDL;
 #endif
 		mCaptureBufferRecording = false;
@@ -6787,7 +6787,7 @@ void LLVivoxVoiceClient::playPreviewBuffer(const LLUUID& effect_id)
 {
 	if (!mCaptureBufferMode)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Voice") << "Not in voice effect preview mode, no buffer to play." << LL_ENDL;
 #endif
 		mCaptureBufferRecording = false;
@@ -6832,7 +6832,7 @@ void LLVivoxVoiceClient::captureBufferRecordStartSendMessage()
 	{
 		std::ostringstream stream;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Voice") << "Starting audio capture to buffer." << LL_ENDL;
 #endif
 
@@ -6861,7 +6861,7 @@ void LLVivoxVoiceClient::captureBufferRecordStopSendMessage()
 	{
 		std::ostringstream stream;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Voice") << "Stopping audio capture to buffer." << LL_ENDL;
 #endif
 
@@ -6892,12 +6892,12 @@ void LLVivoxVoiceClient::captureBufferPlayStartSendMessage(const LLUUID& voice_f
 
 		std::ostringstream stream;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Voice") << "Starting audio buffer playback." << LL_ENDL;
 #endif
 
 		S32 font_index = getVoiceFontTemplateIndex(voice_font_id);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Voice") << "With voice font: " << voice_font_id << " (" << font_index << ")" << LL_ENDL;
 #endif
 
@@ -6919,7 +6919,7 @@ void LLVivoxVoiceClient::captureBufferPlayStopSendMessage()
 	{
 		std::ostringstream stream;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Voice") << "Stopping audio buffer playback." << LL_ENDL;
 #endif
 
@@ -7011,7 +7011,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
 		XML_SetUserData(parser, this);	
 		XML_Parse(parser, mInput.data() + start, delim - start, false);
 		
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("VivoxProtocolParser") << "parsing: " << mInput.substr(start, delim - start) << LL_ENDL;
 #endif
 		start = delim + 3;
@@ -7020,7 +7020,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
 	if(start != 0)
 		mInput = mInput.substr(start);
 	
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("VivoxProtocolParser") << "at end, mInput is: " << mInput << LL_ENDL;
 #endif
 	
@@ -7101,13 +7101,13 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr)
 				}
 			}
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")"  << LL_ENDL;
 #endif
 	}
 	else
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		if (ignoringTags)
 		{
 			LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL;
@@ -7115,7 +7115,7 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr)
 		else
 #endif
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("VivoxProtocolParser") << tag << " (" << responseDepth << ")"  << LL_ENDL;
 #endif
 			
@@ -7126,7 +7126,7 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr)
 				ignoreDepth = responseDepth;
 				accumulateText = false;
 				
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				LL_DEBUGS("VivoxProtocolParser") << "starting ignore, ignoreDepth is " << ignoreDepth << LL_ENDL;
 #endif
 			}
@@ -7187,12 +7187,12 @@ void LLVivoxProtocolParser::EndTag(const char *tag)
 	{
 		if (ignoreDepth == responseDepth)
 		{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 			LL_DEBUGS("VivoxProtocolParser") << "end of ignore" << LL_ENDL;
 #endif
 			ignoringTags = false;
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		else
 		{
 			LL_DEBUGS("VivoxProtocolParser") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL;
@@ -7202,7 +7202,7 @@ void LLVivoxProtocolParser::EndTag(const char *tag)
 	
 	if (!ignoringTags)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("VivoxProtocolParser") << "processing tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL;
 #endif
 		
@@ -7390,7 +7390,7 @@ LLDate LLVivoxProtocolParser::expiryTimeStampToLLDate(const std::string& vivox_t
 	std::string time_stamp = vivox_ts.substr(0, 10);
 	time_stamp += VOICE_FONT_EXPIRY_TIME;
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("VivoxProtocolParser") << "Vivox timestamp " << vivox_ts << " modified to: " << time_stamp << LL_ENDL;
 #endif
 
@@ -7401,7 +7401,7 @@ LLDate LLVivoxProtocolParser::expiryTimeStampToLLDate(const std::string& vivox_t
 
 void LLVivoxProtocolParser::processResponse(std::string tag)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("VivoxProtocolParser") << tag << LL_ENDL;
 #endif
 
@@ -7415,14 +7415,14 @@ void LLVivoxProtocolParser::processResponse(std::string tag)
 	if (isEvent)
 	{
 		const char *eventTypeCstr = eventTypeString.c_str();
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("LowVoice") << eventTypeCstr << LL_ENDL;
 #endif
 
 		if (!stricmp(eventTypeCstr, "ParticipantUpdatedEvent"))
 		{
 			// These happen so often that logging them is pretty useless.
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("LowVoice") << "Updated Params: " << sessionHandle << ", " << sessionGroupHandle << ", " << uriString << ", " << alias << ", " << isModeratorMuted << ", " << isSpeaking << ", " << volume << ", " << energy << LL_ENDL;
 #endif
             LLVivoxVoiceClient::getInstance()->participantUpdatedEvent(sessionHandle, sessionGroupHandle, uriString, alias, isModeratorMuted, isSpeaking, volume, energy);
@@ -7493,7 +7493,7 @@ void LLVivoxProtocolParser::processResponse(std::string tag)
 			 <ParticipantType>0</ParticipantType>
 			 </Event>
 			 */
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("LowVoice") << "Added Params: " << sessionHandle << ", " << sessionGroupHandle << ", " << uriString << ", " << alias << ", " << nameString << ", " << displayNameString << ", " << participantType << LL_ENDL;
 #endif
 			LLVivoxVoiceClient::getInstance()->participantAddedEvent(sessionHandle, sessionGroupHandle, uriString, alias, nameString, displayNameString, participantType);
@@ -7508,7 +7508,7 @@ void LLVivoxProtocolParser::processResponse(std::string tag)
 			 <AccountName>xtx7YNV-3SGiG7rA1fo5Ndw==</AccountName>
 			 </Event>
 			 */
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("LowVoice") << "Removed params:" << sessionHandle << ", " << sessionGroupHandle << ", " << uriString << ", " << alias << ", " << nameString << LL_ENDL;
 #endif
 
@@ -7577,7 +7577,7 @@ void LLVivoxProtocolParser::processResponse(std::string tag)
 	else
 	{
 		const char *actionCstr = actionString.c_str();
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("LowVoice") << actionCstr << LL_ENDL;
 #endif
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 33d9272d739..49f1849cb31 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -356,7 +356,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
 		sculpt_id = sculpt_params->getSculptTexture();
 		sculpt_type = sculpt_params->getSculptType();
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("ObjectUpdate") << "uuid " << mID << " set sculpt_id " << sculpt_id << LL_ENDL;
         dumpStack("ObjectUpdateStack");
 #endif
@@ -1532,7 +1532,7 @@ BOOL LLVOVolume::updateLOD()
 
 	if (lod_changed)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		static const bool enable_log = debugLoggingEnabled("AnimatedObjectsLinkset");
         if (enable_log)
         {
@@ -2310,7 +2310,7 @@ void LLVOVolume::setTEMaterialParamsCallbackTE(const LLUUID& objectID, const LLM
 	LLVOVolume* pVol = (LLVOVolume*)gObjectList.findObject(objectID);
 	if (pVol)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << " to TE " << te << LL_ENDL;
 #endif
 		if (te >= pVol->getNumTEs())
@@ -2327,7 +2327,7 @@ void LLVOVolume::setTEMaterialParamsCallbackTE(const LLUUID& objectID, const LLM
 S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
 {
 	S32 res = LLViewerObject::setTEMaterialID(te, pMaterialID);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("MaterialTEs") << "te "<< (S32)te << " materialid " << pMaterialID.asString() << " res " << res
 								<< ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
 								<< LL_ENDL;
@@ -2588,12 +2588,12 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa
 		}
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	S32 res = 
 #endif
 		LLViewerObject::setTEMaterialParams(te, pMaterial);
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterial) ? pMaterial->asLLSD() : LLSD("null")) << " res " << res
 							 << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
 							 << LL_ENDL;
@@ -2754,7 +2754,7 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m
 		return ;
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("MediaOnAPrim") << "BEFORE: texture_index = " << texture_index
 		<< " hasMedia = " << te->hasMedia() << " : " 
 		<< ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << LL_ENDL;
@@ -2798,7 +2798,7 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m
 		removeMediaImpl(texture_index);
 	}
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("MediaOnAPrim") << "AFTER: texture_index = " << texture_index
 		<< " hasMedia = " << te->hasMedia() << " : " 
 		<< ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << LL_ENDL;
@@ -2936,7 +2936,7 @@ void LLVOVolume::mediaNavigated(LLViewerMediaImpl *impl, LLPluginClassMedia* plu
 	}
 	else if (sObjectMediaNavigateClient)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("MediaOnAPrim") << "broadcasting navigate with URI " << new_location << LL_ENDL;
 #endif
 
@@ -2991,7 +2991,7 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin,
 				
 				case LLViewerMediaImpl::MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS:
 					// This navigate didn't change the current URL.  
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 					LL_DEBUGS("MediaOnAPrim") << "	NOT broadcasting navigate (spurious)" << LL_ENDL;
 #endif
 				break;
@@ -3744,7 +3744,7 @@ void LLVOVolume::setExtendedMeshFlags(U32 flags)
             param_block->setFlags(flags);
         }
         parameterChanged(LLNetworkData::PARAMS_EXTENDED_MESH, true);
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AnimatedObjects") << this
                                      << " new flags " << flags << " curr_flags " << curr_flags
                                      << ", calling onSetExtendedMeshFlags()"
@@ -3808,7 +3808,7 @@ void LLVOVolume::onReparent(LLViewerObject *old_parent, LLViewerObject *new_pare
 // virtual
 void LLVOVolume::afterReparent()
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     {
         LL_DEBUGS("AnimatedObjects") << "new child added for parent " 
             << ((LLViewerObject*)getParent())->getID() << LL_ENDL;
@@ -3817,7 +3817,7 @@ void LLVOVolume::afterReparent()
 
     if (isAnimatedObject() && getControlAvatar())
     {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("AnimatedObjects") << "adding attachment overrides, parent is animated object " 
             << ((LLViewerObject*)getParent())->getID() << LL_ENDL;
 #endif
@@ -3832,7 +3832,7 @@ void LLVOVolume::afterReparent()
         //getControlAvatar()->rebuildAttachmentOverrides();
         getControlAvatar()->updateAnimations();
     }
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     else
     {
         LL_DEBUGS("AnimatedObjects") << "not adding overrides, parent: " 
@@ -3856,7 +3856,7 @@ void LLVOVolume::updateRiggingInfo()
         LLVolume *volume = getVolume();
         if (skin && avatar && volume)
         {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("RigSpammish") << "starting, vovol " << this << " lod " << getLOD() << " last " << mLastRiggingInfoLOD << LL_ENDL;
 #endif
             if (getLOD()>mLastRiggingInfoLOD || getLOD()==3)
@@ -3874,7 +3874,7 @@ void LLVOVolume::updateRiggingInfo()
                 }
                 // Keep the highest LOD info available.
                 mLastRiggingInfoLOD = getLOD();
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
                 LL_DEBUGS("RigSpammish") << "updated rigging info for LLVOVolume " 
                                          << this << " lod " << mLastRiggingInfoLOD 
                                          << LL_ENDL;
@@ -4418,7 +4418,7 @@ void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_u
         bool was_enabled = (getControlAvatar() != NULL);
         if (enabled != was_enabled)
         {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("AnimatedObjects") << this
                                          << " calling onSetExtendedMeshFlags, enabled " << (U32) enabled
                                          << " was_enabled " << (U32) was_enabled
@@ -4570,7 +4570,7 @@ const LLMatrix4& LLVOVolume::getWorldMatrix(LLXformMatrix* xform) const
 
 void LLVOVolume::markForUpdate(BOOL priority)
 { 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	static const bool enable_log = debugLoggingEnabled("AnimatedObjectsLinkset");
     if (enable_log)
     {
@@ -6172,7 +6172,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
 			{
 				LLVOVolume* vobj = drawablep->getVOVolume();
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 				static const bool enable_log = debugLoggingEnabled("AnimatedObjectsLinkset");
                 if (enable_log)
                 {
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index eaf99b0aece..7d020572f02 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -81,7 +81,7 @@ void LLWearableList::getAsset(const LLAssetID& assetID, const std::string& weara
 	LLViewerWearable* instance = get_if_there(mList, assetID, (LLViewerWearable*)NULL );
 	if( instance )
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Avatar") << "wearable " << assetID << " found in LLWearableList" << LL_ENDL;
 #endif
 		asset_arrived_callback( instance, userdata );
@@ -106,7 +106,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
 	LLViewerWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLViewerWearable*)NULL);
 	if (wearable)
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Wearable") << "processGetAssetReply()" << LL_ENDL;
 		LL_DEBUGS("Wearable") << wearable << LL_ENDL;
 #endif
@@ -203,7 +203,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
 	if (wearable) // success
 	{
 		LLWearableList::instance().mList[ uuid ] = wearable;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("Wearable") << "processGetAssetReply()" << LL_ENDL;
 		LL_DEBUGS("Wearable") << wearable << LL_ENDL;
 #endif
@@ -239,7 +239,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
 
 LLViewerWearable* LLWearableList::createCopy(const LLViewerWearable* old_wearable, const std::string& new_name)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS() << "LLWearableList::createCopy()" << LL_ENDL;
 #endif
 
@@ -260,7 +260,7 @@ LLViewerWearable* LLWearableList::createCopy(const LLViewerWearable* old_wearabl
 
 LLViewerWearable* LLWearableList::createNewWearable( LLWearableType::EType type, LLAvatarAppearance *avatarp )
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS() << "LLWearableList::createNewWearable()" << LL_ENDL;
 #endif
 
diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
index 6f97cc81b92..37fab93123f 100644
--- a/indra/newview/llwebprofile.cpp
+++ b/indra/newview/llwebprofile.cpp
@@ -73,7 +73,7 @@ void LLWebProfile::uploadImage(LLPointer<LLImageFormatted> image, const std::str
 // static
 void LLWebProfile::setAuthCookie(const std::string& cookie)
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Snapshots") << "Setting auth cookie: " << cookie << LL_ENDL;
 #endif
 	sAuthCookie = cookie;
@@ -120,7 +120,7 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin
     configUrl += "?caption=" + LLURI::escape(caption);
     configUrl += "&add_loc=" + std::string(addLocation ? "1" : "0");
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("Snapshots") << "Requesting " << configUrl << LL_ENDL;
 #endif
 
@@ -179,7 +179,7 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin
         LLWebProfile::reportImageUploadStatus(false);
     }
 
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("Snapshots") << "Got redirection URL: " << redirUrl << LL_ENDL;
 #endif
 
diff --git a/indra/newview/llwind.cpp b/indra/newview/llwind.cpp
index 11b2cfea6c7..89a2bcc19bc 100644
--- a/indra/newview/llwind.cpp
+++ b/indra/newview/llwind.cpp
@@ -71,7 +71,7 @@ LLWind::~LLWind()
 
 void LLWind::init()
 {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("Wind") << "initializing wind size: "<< mSize << LL_ENDL;
 #endif
 	
diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp
index f3bf9662818..64d9460cd9a 100644
--- a/indra/newview/llwlhandlers.cpp
+++ b/indra/newview/llwlhandlers.cpp
@@ -66,7 +66,7 @@ void LLEnvironmentRequest::onRegionCapsReceived(const LLUUID& region_id, LLEnvir
 		LL_INFOS("WindlightCaps") << "Got caps for a non-current region" << LL_ENDL;
 		return;
 	}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 	LL_DEBUGS("WindlightCaps") << "Received region capabilities" << LL_ENDL;
 #endif
 	doRequest(cb);
@@ -182,7 +182,7 @@ bool LLEnvironmentApply::initiateRequest(const LLSD& content, LLEnvironment::env
 	}
 
     LL_INFOS("WindlightCaps") << "Sending windlight settings to " << url << LL_ENDL;
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS("WindlightCaps") << "content: " << content << LL_ENDL;
 #endif
 
@@ -254,7 +254,7 @@ void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content, LLE
             notify["FAIL_REASON"] = result["fail_reason"].asString();
             break;
         }
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
         LL_DEBUGS("WindlightCaps") << "Success in applying windlight settings to region " << result["regionID"].asUUID() << LL_ENDL;
 #endif
 
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 1eed8487856..ee0fe77429e 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1181,7 +1181,7 @@ class LLEstablishAgentCommunication final : public LLHTTPNode
 					<< sim << LL_ENDL;
 			return;
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("CrossingCaps") << "Calling setSeedCapability from LLEstablishAgentCommunication::post. Seed cap == "
 				<< input["body"]["seed-capability"] << LL_ENDL;
 #endif
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 7c8c24dc009..7e0cd4e6320 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1751,7 +1751,7 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
 		{
 			gViewerWindow->setCursor( UI_CURSOR_CROSS );
 		}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		LL_DEBUGS("UserInput") << "hover handled by LLWorldMapView" << LL_ENDL;		
 #endif
 		return TRUE;
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index 4460e317cdc..964ff7654d6 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -383,7 +383,7 @@ class Poller
         XMLRPC_REQUEST response = mTransaction->response();
         if (! response)
         {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("LLXMLRPCListener") << "No response" << LL_ENDL;
 #endif
             return LLSD();
@@ -392,7 +392,7 @@ class Poller
         XMLRPC_VALUE param = XMLRPC_RequestGetData(response);
         if (! param)
         {
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("LLXMLRPCListener") << "Response contains no data" << LL_ENDL;
 #endif
             return LLSD();
@@ -418,14 +418,14 @@ class Poller
              current = XMLRPC_VectorNext(param))
         {
             std::string key(XMLRPC_GetValueID(current));
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS("LLXMLRPCListener") << "key: " << key_pfx << key << LL_ENDL;
 #endif
             XMLRPC_VALUE_TYPE_EASY type = XMLRPC_GetValueTypeEasy(current);
             if (xmlrpc_type_string == type)
             {
                 LLSD::String val(XMLRPC_GetValueString(current));
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
                 LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
 #endif
                 responses.insert(key, val);
@@ -433,7 +433,7 @@ class Poller
             else if (xmlrpc_type_int == type)
             {
                 LLSD::Integer val(XMLRPC_GetValueInt(current));
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
                 LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
 #endif
                 responses.insert(key, val);
@@ -441,7 +441,7 @@ class Poller
             else if (xmlrpc_type_double == type)
             {
                 LLSD::Real val(XMLRPC_GetValueDouble(current));
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
                 LL_DEBUGS("LLXMLRPCListener") << "val: " << val << LL_ENDL;
 #endif
                 responses.insert(key, val);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 2df72d4ffe4..75cf660471b 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3342,7 +3342,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f
 {
 	if (drawablep && !drawablep->isDead() && assertInitialized())
 	{
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
 		static const bool enable_log = debugLoggingEnabled("AnimatedObjectsLinkset");
         if (enable_log)
         {
@@ -10966,20 +10966,20 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
         LL_WARNS_ONCE("AvatarRenderPipeline") << "Avatar is " << (avatar ? "not drawable" : "null") << LL_ENDL;
 		return;
 	}
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is drawable" << LL_ENDL;
 #endif
 
 	assertInitialized();
 
 	bool visually_muted = avatar->isVisuallyMuted();	
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID()
                               << " is " << ( visually_muted ? "" : "not ") << "visually muted"
                               << LL_ENDL;
 #endif
 	bool too_complex = avatar->isTooComplex();		
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
     LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID()
                               << " is " << ( too_complex ? "" : "not ") << "too complex"
                               << LL_ENDL;
@@ -11236,14 +11236,14 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
 		if (visually_muted)
 		{	// Visually muted avatar
             const LLColor4& muted_color(avatar->getMutedAVColor());
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " MUTED set solid color " << muted_color << LL_ENDL;
 #endif
 			gGL.diffuseColor4fv( muted_color.mV );
 		}
 		else
 		{ //grey muted avatar
-#if SHOW_DEBUG
+#ifdef SHOW_DEBUG
             LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " MUTED set grey" << LL_ENDL;
 #endif
 			gGL.diffuseColor4fv(LLColor4::pink.mV );
-- 
GitLab