diff options
Diffstat (limited to 'indra/llcommon/llpreprocessor.h')
-rwxr-xr-x | indra/llcommon/llpreprocessor.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index e5c8482ed1..0fcc872690 100755 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -188,4 +188,15 @@ #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_MESSAGE(msg) __pragma(message(LL_FILE_LINENO(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 |