summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/CMakeLists.txt1
-rw-r--r--indra/llcommon/fix_macros.h25
-rw-r--r--indra/llcorehttp/_refcounted.h1
-rw-r--r--indra/llvfs/lldiriterator.cpp1
-rw-r--r--indra/llwindow/llwindowmacosx.h2
-rw-r--r--indra/llwindow/llwindowsdl.h2
-rw-r--r--indra/newview/lldirpicker.h2
-rw-r--r--indra/newview/llfilepicker.h2
-rw-r--r--indra/newview/lllocalbitmaps.cpp4
-rw-r--r--indra/newview/macutil_Prefix.h2
10 files changed, 34 insertions, 8 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 36a8319189..66e2bc9095 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -116,6 +116,7 @@ set(llcommon_HEADER_FILES
bitpack.h
ctype_workaround.h
doublelinkedlist.h
+ fix_macros.h
imageids.h
indra_constants.h
linden_common.h
diff --git a/indra/llcommon/fix_macros.h b/indra/llcommon/fix_macros.h
new file mode 100644
index 0000000000..ef959decff
--- /dev/null
+++ b/indra/llcommon/fix_macros.h
@@ -0,0 +1,25 @@
+/**
+ * @file fix_macros.h
+ * @author Nat Goodspeed
+ * @date 2012-11-16
+ * @brief The Mac system headers seem to #define macros with obnoxiously
+ * generic names, preventing any library from using those names. We've
+ * had to fix these in so many places that it's worth making a header
+ * file to handle it.
+ *
+ * $LicenseInfo:firstyear=2012&license=viewerlgpl$
+ * Copyright (c) 2012, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// DON'T use an #include guard: every time we encounter this header, #undef
+// these macros all over again.
+
+// who injects MACROS with such generic names?! Grr.
+#ifdef equivalent
+#undef equivalent
+#endif
+
+#ifdef check
+#undef check
+#endif
diff --git a/indra/llcorehttp/_refcounted.h b/indra/llcorehttp/_refcounted.h
index a96c65fb6b..21a916b13b 100644
--- a/indra/llcorehttp/_refcounted.h
+++ b/indra/llcorehttp/_refcounted.h
@@ -30,6 +30,7 @@
#include "linden_common.h"
+#include "fix_macros.h"
#include <boost/thread.hpp>
#include "llapr.h"
diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp
index fa806bf23e..460d2a8b4f 100644
--- a/indra/llvfs/lldiriterator.cpp
+++ b/indra/llvfs/lldiriterator.cpp
@@ -26,6 +26,7 @@
#include "lldiriterator.h"
+#include "fix_macros.h"
#include <boost/filesystem.hpp>
#include <boost/regex.hpp>
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 52ba8b3bf3..af83b50097 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -36,8 +36,8 @@
#include <AGL/agl.h>
// AssertMacros.h does bad things.
+#include "fix_macros.h"
#undef verify
-#undef check
#undef require
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index 4e2a269ea3..c5ce892a04 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -41,8 +41,8 @@
#endif
// AssertMacros.h does bad things.
+#include "fix_macros.h"
#undef verify
-#undef check
#undef require
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index 2188b7edd0..682f9d6476 100644
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -37,8 +37,8 @@
#include <Carbon/Carbon.h>
// AssertMacros.h does bad things.
+#include "fix_macros.h"
#undef verify
-#undef check
#undef require
#include <vector>
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index 55c665b9c7..4f602f63f1 100644
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -39,8 +39,8 @@
#include <Carbon/Carbon.h>
// AssertMacros.h does bad things.
+#include "fix_macros.h"
#undef verify
-#undef check
#undef require
#include <vector>
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 459e52c4f4..97ba5b634a 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -32,9 +32,7 @@
#include "lllocalbitmaps.h"
/* boost: will not compile unless equivalent is undef'd, beware. */
-#ifdef equivalent
-#undef equivalent
-#endif
+#include "fix_macros.h"
#include <boost/filesystem.hpp>
/* image compression headers. */
diff --git a/indra/newview/macutil_Prefix.h b/indra/newview/macutil_Prefix.h
index fd8e927a08..b54a764a62 100644
--- a/indra/newview/macutil_Prefix.h
+++ b/indra/newview/macutil_Prefix.h
@@ -33,7 +33,7 @@
*/
#include <Carbon/Carbon.h>
+#include "fix_macros.h"
-#undef check
#undef verify
#undef require