summaryrefslogtreecommitdiff
path: root/indra/llcommon/llpreprocessor.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-08-26 18:17:26 -0700
committerRichard Linden <none@none>2013-08-26 18:17:26 -0700
commit1f3f660cf4de95fa7e6cbe4015630640aecd22dd (patch)
tree1b64dea44cca08731b0c33b15b90e929c83831d0 /indra/llcommon/llpreprocessor.h
parentcb8c94cc888c432a22af98f9d28d448d66a77a52 (diff)
parent8535b87544cc2e71896716a4cd1c3c2445ff4af0 (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
Diffstat (limited to 'indra/llcommon/llpreprocessor.h')
-rwxr-xr-xindra/llcommon/llpreprocessor.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index e5c8482ed1..eea63d443f 100755
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -188,4 +188,17 @@
#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) __FILE__ "(" LL_TO_STRING(__LINE__) ") : " msg
+#if LL_WINDOWS
+#define LL_COMPILE_TIME_WARNING(msg) __pragma(message(LL_FILE_LINENO(msg)))
+#define LL_COMPILE_TIME_ERROR(msg) static_assert(false, 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_WARNING(msg)
+#define LL_COMPILE_TIME_ERROR(msg)
+#endif
+
#endif // not LL_LINDEN_PREPROCESSOR_H