summaryrefslogtreecommitdiff
path: root/indra/llcommon/llpreprocessor.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-11-11 19:17:49 -0800
committerRichard Linden <none@none>2013-11-11 19:17:49 -0800
commit17e9c872ada0cd1d3bf5c16887ee7f220f3a10c7 (patch)
tree93f36acc00695d7b4ee2e43d08ce790358966f38 /indra/llcommon/llpreprocessor.h
parentebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff)
parent1983f52ce5211c02a55f5cabd86962eea3a22084 (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/llcommon/llpreprocessor.h')
-rwxr-xr-xindra/llcommon/llpreprocessor.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 7fdb537ab5..309165da7f 100755
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -181,4 +181,25 @@
# define LL_COMMON_API
#endif // LL_COMMON_LINK_SHARED
+#if LL_WINDOWS
+#define LL_TYPEOF(exp) decltype(exp)
+#elif LL_LINUX
+#define LL_TYPEOF(exp) typeof(exp)
+#elif LL_DARWIN
+#define LL_TYPEOF(exp) typeof(exp)
+#endif
+
+#define LL_TO_STRING_HELPER(x) #x
+#define LL_TO_STRING(x) LL_TO_STRING_HELPER(x)
+#define LL_FILE_LINENO_MSG(msg) __FILE__ "(" LL_TO_STRING(__LINE__) ") : " msg
+#define LL_GLUE_IMPL(x, y) x##y
+#define LL_GLUE_TOKENS(x, y) LL_GLUE_IMPL(x, y)
+
+#if LL_WINDOWS
+#define LL_COMPILE_TIME_MESSAGE(msg) __pragma(message(LL_FILE_LINENO_MSG(msg)))
+#else
+// no way to get gcc 4.2 to print a user-defined diagnostic message only when a macro is used
+#define LL_COMPILE_TIME_MESSAGE(msg)
+#endif
+
#endif // not LL_LINDEN_PREPROCESSOR_H