On Thu, Oct 21, 2010 at 01:11:22AM -0400, Kevin Hunter wrote:
The clue that it's not a macro (aside from reading the
documentation) is that it does not get processed out by the -E flag
to g++. Thus, the trip up is that it can't be concatenated as if it
were an inline string. See the attached example CPP code. Note
that to make it compile, you'll need to comment out line 37.
So, I believe the issue *is* with the macro definition, but, as is
usual with macros, not where one expects.
Thank you, Kevin, for this elaborate explanation!
Especially the note about the difference between macro and the
language identifier.
The attached patch makes compilation for this file work for me. I
still haven't finished a complete build, so I hope it doesn't trip up
somewhere else. Could someone please test it on a complete build?
Thanks,
Thomas
diff --git a/sal/inc/osl/diagnose.h b/sal/inc/osl/diagnose.h
index cbfabf3..120b4b0 100644
--- a/sal/inc/osl/diagnose.h
+++ b/sal/inc/osl/diagnose.h
@@ -95,7 +95,7 @@ pfunc_osl_printDetailedDebugMessage SAL_CALL osl_setDetailedDebugMessageFunc( pf
#define OSL_MACRO_VALUE_TO_STRING( x ) OSL_TO_STRING( x )
/* the macro OSL_LOG_PREFIX is intended to be an office internal macro for now */
-#define OSL_LOG_PREFIX OSL_THIS_FILE ":" OSL_THIS_FUNC ":" OSL_MACRO_VALUE_TO_STRING( __LINE__ )
"; "
+#define OSL_LOG_PREFIX (OSL_THIS_FILE, ":", OSL_THIS_FUNC, ":", OSL_MACRO_VALUE_TO_STRING(
__LINE__ ), "; ")
#define OSL_DEBUG_ONLY(s) _OSL_DEBUG_ONLY(s)
#define OSL_TRACE _OSL_TRACE
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.