From 96869c0de45c20949ede6deeb4e8f954b7b209ca Mon Sep 17 00:00:00 2001
From: Steven Bennetts <steve@lindenlab.com>
Date: Mon, 15 Sep 2008 19:45:18 +0000
Subject: Fix for VC7 DEBUG build failure

---
 indra/llcommon/linden_common.h     | 8 +++++---
 indra/newview/llappviewerwin32.cpp | 4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h
index 1581522a2e..a48c3fbb8c 100644
--- a/indra/llcommon/linden_common.h
+++ b/indra/llcommon/linden_common.h
@@ -33,9 +33,11 @@
 #define LL_LINDEN_COMMON_H
 
 #if defined(LL_WINDOWS) && defined(_DEBUG)
-# define _CRTDBG_MAP_ALLOC
-# include <stdlib.h>
-# include <crtdbg.h>
+# if _MSC_VER >= 1400 // Visual C++ 2005 or later
+#  define _CRTDBG_MAP_ALLOC
+#  include <stdlib.h>
+#  include <crtdbg.h>
+# endif
 #endif
 
 #include "llpreprocessor.h"
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index a25b86467d..bdffaeafb3 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -32,7 +32,9 @@
 #include "llviewerprecompiledheaders.h"
 
 #if defined(_DEBUG)
-#	define WINDOWS_CRT_MEM_CHECKS 1 
+# if _MSC_VER >= 1400 // Visual C++ 2005 or later
+#	define WINDOWS_CRT_MEM_CHECKS 1
+# endif
 #endif
 
 #include "llappviewerwin32.h"
-- 
cgit v1.2.3