From 296ec41e1648efe981a30043b4a7f23590d8a828 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 19 Aug 2013 11:57:33 -0700 Subject: BUILDFIX: abstracted decltype into macro LLTYPEOF for temporary gcc 4.1/4.2 support --- indra/llcommon/llpreprocessor.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/llcommon/llpreprocessor.h') diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index 7fdb537ab5..a764a42fca 100755 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -181,4 +181,11 @@ # define LL_COMMON_API #endif // LL_COMMON_LINK_SHARED +#if LL_WINDOWS +#define LLTYPEOF(exp) decltype(exp) +#elif LL_LINUX +#define LLTYPEOF(exp) typeof(exp) +#elif LL_DARWIN +#define LLTYPEOF(exp) typeof(exp) +#endif #endif // not LL_LINDEN_PREPROCESSOR_H -- cgit v1.2.3 From ea45b8acd25785bd2789c2c1928e223c9a8e2fbd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 19 Aug 2013 14:17:17 -0700 Subject: BUILDFIX: refactored decltype out into traits class --- indra/llcommon/llpreprocessor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llcommon/llpreprocessor.h') diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index a764a42fca..e5c8482ed1 100755 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -182,10 +182,10 @@ #endif // LL_COMMON_LINK_SHARED #if LL_WINDOWS -#define LLTYPEOF(exp) decltype(exp) +#define LL_TYPEOF(exp) decltype(exp) #elif LL_LINUX -#define LLTYPEOF(exp) typeof(exp) +#define LL_TYPEOF(exp) typeof(exp) #elif LL_DARWIN -#define LLTYPEOF(exp) typeof(exp) +#define LL_TYPEOF(exp) typeof(exp) #endif #endif // not LL_LINDEN_PREPROCESSOR_H -- cgit v1.2.3 From 662d6a17712fbba5cea0d9cf20f5a2f32e2dd537 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 26 Aug 2013 10:51:08 -0700 Subject: added compile time warnings to use of deprecated llinfos, llwarns, etc. --- indra/llcommon/llpreprocessor.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/llcommon/llpreprocessor.h') 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 -- cgit v1.2.3 From e1c09b9b5943cfa2f35eef878643b90d412a41ab Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 26 Aug 2013 18:21:19 -0700 Subject: fixed eol type --- indra/llcommon/llpreprocessor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llpreprocessor.h') diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index eea63d443f..f00885ae2f 100755 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -189,7 +189,7 @@ #define LL_TYPEOF(exp) typeof(exp) #endif -#define LL_TO_STRING_HELPER(x) #x +#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 -- cgit v1.2.3 From a7aed07a5b620977fb74e4070e432eef01d11d3c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 27 Aug 2013 13:41:19 -0700 Subject: broke out llunit.h into llunittype.h and llunits.h for unit declarations changed unit declarations macros to make a lot more sense --- indra/llcommon/llpreprocessor.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/llcommon/llpreprocessor.h') diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index f00885ae2f..0fcc872690 100755 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -193,12 +193,10 @@ #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) +#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_WARNING(msg) -#define LL_COMPILE_TIME_ERROR(msg) +#define LL_COMPILE_TIME_MESSAGE(msg) #endif #endif // not LL_LINDEN_PREPROCESSOR_H -- cgit v1.2.3 From cbe397ad13665c7bc993e10d8fe1e4a876253378 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 5 Sep 2013 14:04:13 -0700 Subject: changed fast timer over to using macro another attempt to move mem stat into base class --- indra/llcommon/llpreprocessor.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/llcommon/llpreprocessor.h') diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index 0fcc872690..309165da7f 100755 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -191,9 +191,12 @@ #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 +#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))) +#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) -- cgit v1.2.3