diff options
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_m68k')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx | 28 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx | 15 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk | 2 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx | 3 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx | 11 |
5 files changed, 31 insertions, 28 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx index 2121001d2820..7c46d1a0b408 100644 --- a/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,7 +27,7 @@ ************************************************************************/ #include <malloc.h> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <rtl/alloc.h> #include <osl/mutex.hxx> @@ -64,7 +65,7 @@ namespace // pCallStack: ret, [return ptr], this, params char * pTopStack = (char *)(pCallStack + 0); char * pCppStack = pTopStack; -#ifdef CMC_DEBUG +#if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "cpp2uno_call\n"); #endif // return @@ -80,14 +81,14 @@ namespace { if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr )) { -#ifdef CMC_DEBUG +#if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "simple return\n"); #endif pUnoReturn = pRegisterReturn; // direct way for simple types } else // complex return via ptr (pCppReturn) { -#ifdef CMC_DEBUG +#if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "complex return\n"); #endif pCppReturn = (void *)r8; @@ -189,18 +190,18 @@ namespace uno_Any aUnoExc; // Any will be constructed by callee uno_Any * pUnoExc = &aUnoExc; -#ifdef CMC_DEBUG +#if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "before dispatch\n"); #endif // invoke uno dispatch call (*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc ); -#ifdef CMC_DEBUG +#if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "after dispatch\n"); #endif - // in case an exception occured... + // in case an exception occurred... if (pUnoExc) { // destruct temporary in/inout params @@ -221,7 +222,7 @@ namespace // is here for dummy return typelib_TypeClass_VOID; } - else // else no exception occured... + else // else no exception occurred... { // temporary params for ( ; nTempIndizes--; ) @@ -276,7 +277,7 @@ namespace sal_Int64 * pRegisterReturn /* space for register return */ ) { void ** pCallStack = (void**)(sp); -#ifdef CMC_DEBUG +#if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "cpp_mediate with\n"); fprintf(stderr, "%x %x\n", nFunctionIndex, nVtableOffset); fprintf(stderr, "and %x %x\n", pCallStack, pRegisterReturn); @@ -299,7 +300,7 @@ namespace if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex) { throw RuntimeException( - OUString::createFromAscii("illegal vtable index!"), + OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal vtable index!" )), (XInterface *)pCppI ); } @@ -398,7 +399,7 @@ namespace default: { throw RuntimeException( - OUString::createFromAscii("no member description found!"), + OUString( RTL_CONSTASCII_USTRINGPARAM( "no member description found!" )), (XInterface *)pCppI ); // is here for dummy eRet = typelib_TypeClass_VOID; @@ -513,9 +514,6 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( reinterpret_cast< typelib_InterfaceMethodTypeDescription * >(member); - bool issimple = bridges::cpp_uno::shared::isSimpleType( - pMethodTD->pReturnTypeRef); - code = codeSnippet(code, functionOffset++, vtableOffset); break; } @@ -533,4 +531,4 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode( { } -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx index 9d036d1b5ae8..1128f0f85cd8 100644 --- a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,7 +30,7 @@ #include <string.h> #include <dlfcn.h> #include <cxxabi.h> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> @@ -100,7 +101,7 @@ namespace CPPU_CURRENT_NAMESPACE //===================================================================== class RTTI { - typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map; + typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map; Mutex m_mutex; t_rtti_map m_rttis; @@ -227,7 +228,7 @@ namespace CPPU_CURRENT_NAMESPACE OUStringToOString( *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), RTL_TEXTENCODING_ASCII_US ) ); - fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() ); + fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() ); #endif void * pCppExc; type_info * rtti; @@ -298,7 +299,7 @@ namespace CPPU_CURRENT_NAMESPACE uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); #if OSL_DEBUG_LEVEL > 0 OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); - OSL_ENSURE( 0, cstr.getStr() ); + OSL_FAIL( cstr.getStr() ); #endif return; } @@ -307,7 +308,7 @@ namespace CPPU_CURRENT_NAMESPACE OUString unoName( toUNOname( header->exceptionType->name() ) ); #if OSL_DEBUG_LEVEL > 1 OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) ); - fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() ); + fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() ); #endif typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData ); if (0 == pExcTypeDescr) @@ -319,7 +320,7 @@ namespace CPPU_CURRENT_NAMESPACE uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); #if OSL_DEBUG_LEVEL > 0 OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); - OSL_ENSURE( 0, cstr.getStr() ); + OSL_FAIL( cstr.getStr() ); #endif } else @@ -331,4 +332,4 @@ namespace CPPU_CURRENT_NAMESPACE } } -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk index 8ad89c973b9e..3978bda7cb16 100644 --- a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk +++ b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk @@ -45,7 +45,7 @@ NO_BSYMBOLIC=TRUE CFLAGS += -DLEAK_STATIC_DATA .ENDIF -CFLAGSCXX += -fno-omit-frame-pointer +CFLAGSCXX += -fno-omit-frame-pointer -fno-strict-aliasing NOOPTFILES= \ $(SLO)$/cpp2uno.obj \ diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx b/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx index 6e148b489508..4ec09c29ff0a 100644 --- a/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,5 @@ void raiseException( void fillUnoException( __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx index 2bee8f1e0fad..0d0fd27678eb 100644 --- a/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,7 +110,7 @@ void callVirtualMethod( memcpy( stack, pStack, nStackBytes ); } -#ifdef CMC_DEBUG +#if OSL_DEBUG_LEVEL > 2 // Let's figure out what is really going on here { fprintf( stderr, "\nStack (%d): ", nStack ); @@ -228,7 +229,7 @@ static void cpp_call( { case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: -#ifdef CMC_DEBUG +#if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]); #endif INSERT_INT64( pCppArgs[nPos], pStack ); @@ -236,7 +237,7 @@ static void cpp_call( case typelib_TypeClass_LONG: case typelib_TypeClass_UNSIGNED_LONG: case typelib_TypeClass_ENUM: -#ifdef CMC_DEBUG +#if OSL_DEBUG_LEVEL > 2 fprintf(stderr, "long is %x\n", pCppArgs[nPos]); #endif INSERT_INT32( pCppArgs[nPos], pStack ); @@ -301,7 +302,7 @@ static void cpp_call( pStackStart, (pStack - pStackStart)); - // NO exception occured... + // NO exception occurred... *ppUnoExc = 0; // reconvert temporary params @@ -490,4 +491,4 @@ void unoInterfaceProxyDispatch( } } } -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |