[Libreoffice] ucb/source/ucb compilation error

Thomas Klausner wiz at NetBSD.org
Thu Oct 21 00:40:53 PDT 2010


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
-------------- next part --------------
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


More information about the LibreOffice mailing list