summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_ia64
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-01 17:12:28 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-01 17:12:28 +0100
commit0d139d3d2ee2ccca6c2c162e169a227d76147612 (patch)
tree86bcb74f3d7626b63df0ba1f0b6877d1cf099093 /bridges/source/cpp_uno/gcc3_linux_ia64
parent61100f6fc62766a3ee25484f381ac5425687cf58 (diff)
Oops, use #if instead of #ifdef
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_ia64')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx32
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx34
2 files changed, 33 insertions, 33 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx
index d7764e562007..e897397ce76b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx
@@ -56,7 +56,7 @@ static typelib_TypeClass cpp2uno_call(
void ** gpreg, void ** fpreg, void ** ovrflw,
sal_Int64 * pRegisterReturn /* space for register return */ )
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "as far as cpp2uno_call\n");
#endif
@@ -121,14 +121,14 @@ static typelib_TypeClass cpp2uno_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "arg %d of %d\n", nPos, nParams);
#endif
//I think it is impossible to get UNO to pass structs as parameters by copy
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple\n");
#endif
@@ -194,7 +194,7 @@ static typelib_TypeClass cpp2uno_call(
}
else // ptr to complex value | ref
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex, ng is %d\n", ng);
#endif
void *pCppStack; //temporary stack pointer
@@ -238,7 +238,7 @@ static typelib_TypeClass cpp2uno_call(
}
}
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of params\n");
#endif
@@ -336,25 +336,25 @@ static typelib_TypeClass cpp_mediate(
{
nFunctionIndex &= 0x7fffffff;
pThis = gpreg[1];
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is gpreg[1]\n");
#endif
}
else
{
pThis = gpreg[0];
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is gpreg[0]\n");
#endif
}
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is %p\n", pThis);
#endif
pThis = static_cast< char * >(pThis) - nVtableOffset;
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pThis is now %p\n", pThis);
#endif
@@ -364,7 +364,7 @@ static typelib_TypeClass cpp_mediate(
typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "indexes are %d %d\n", nFunctionIndex, pTypeDescr->nMapFunctionIndexToMemberIndex);
#endif
@@ -380,7 +380,7 @@ static typelib_TypeClass cpp_mediate(
sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "members are %d %d\n", nMemberPos, pTypeDescr->nAllMembers);
#endif
@@ -468,7 +468,7 @@ static typelib_TypeClass cpp_mediate(
}
default:
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "screwed\n");
#endif
@@ -480,7 +480,7 @@ static typelib_TypeClass cpp_mediate(
}
}
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "end of cpp_mediate\n");
#endif
return eRet;
@@ -520,7 +520,7 @@ extern "C" ia64::RegReturn cpp_vtable_call(
register double f14 asm("f14"); fpreg[6] = f14;
register double f15 asm("f15"); fpreg[7] = f15;
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "cpp_vtable_call called with %lx\n", nOffsetAndIndex);
fprintf(stderr, "adump is %lx %lx %lx %lx %lx %lx %lx %lx\n", in0, in1, in2, in3, in4, in5, in6, in7);
fprintf(stderr, "bdump is %f %f %f %f %f %f %f %f\n", f8, f9, f10, f11, f12, f13, f14, f15);
@@ -576,7 +576,7 @@ const int codeSnippetSize = 40;
bridges::cpp_uno::shared::VtableFactory::Slot codeSnippet( unsigned char * code, sal_PtrDiff writetoexecdiff, sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
bool bHasHiddenParam )
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "size is %d\n", codeSnippetSize);
fprintf(stderr,"in codeSnippet functionIndex is %x\n", nFunctionIndex);
fprintf(stderr,"in codeSnippet vtableOffset is %x\n", nVtableOffset);
@@ -632,7 +632,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
(*in_slots) -= functionCount;
Slot * slots = *in_slots;
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "in addLocalFunctions functionOffset is %x\n",functionOffset);
fprintf(stderr, "in addLocalFunctions vtableOffset is %x\n",vtableOffset);
#endif
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
index c2317e27a5c2..19b586b557f2 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
@@ -177,7 +177,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
if ( nGPR > ia64::MAX_GPR_REGS )
nGPR = ia64::MAX_GPR_REGS;
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
// Let's figure out what is really going on here
{
fprintf( stderr, "= callVirtualMethod() =\nGPR's (%d): ", nGPR );
@@ -337,7 +337,7 @@ static void cpp_call(
bool bSimpleReturn = true;
if (pReturnTypeDescr)
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "return type is %d\n", pReturnTypeDescr->eTypeClass);
#endif
if ( ia64::return_in_hidden_param(pReturnTypeRef) || ia64::return_via_r8_buffer(pReturnTypeRef) )
@@ -346,7 +346,7 @@ static void cpp_call(
if ( bSimpleReturn )
{
pCppReturn = pUnoReturn; // direct way for simple types
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "simple return\n");
#endif
}
@@ -355,7 +355,7 @@ static void cpp_call(
// complex return via ptr
pCppReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
? alloca( pReturnTypeDescr->nSize ) : pUnoReturn);
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "pCppReturn/pUnoReturn is %lx/%lx", pCppReturn, pUnoReturn);
#endif
if (!ia64::return_via_r8_buffer(pReturnTypeRef))
@@ -365,7 +365,7 @@ static void cpp_call(
// push "this" pointer
void * pAdjustedThisPtr = reinterpret_cast< void ** >( pThis->getCppI() ) + aVtableSlot.offset;
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "this pointer is %p\n", pAdjustedThisPtr);
#endif
INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack, bOverFlow );
@@ -379,7 +379,7 @@ static void cpp_call(
sal_Int32 nTempIndizes = 0;
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "n params is %d\n", nParams);
#endif
@@ -389,7 +389,7 @@ static void cpp_call(
typelib_TypeDescription * pParamTypeDescr = 0;
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "param %d is %d %d %d\n", nPos, rParam.bOut, bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ),
pParamTypeDescr->eTypeClass);
#endif
@@ -403,7 +403,7 @@ static void cpp_call(
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "hyper is %lx\n", *(unsigned long*)(pCppArgs[nPos]));
#endif
INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
@@ -411,7 +411,7 @@ static void cpp_call(
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_ENUM:
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "long is %lx\n", *(unsigned int*)(pCppArgs[nPos]));
#endif
INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
@@ -419,27 +419,27 @@ static void cpp_call(
case typelib_TypeClass_SHORT:
case typelib_TypeClass_CHAR:
case typelib_TypeClass_UNSIGNED_SHORT:
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "short is %x\n", *(unsigned short*)(pCppArgs[nPos]));
#endif
INSERT_INT16( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
break;
case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE:
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "byte is %x\n", *(unsigned char*)(pCppArgs[nPos]));
#endif
INSERT_INT8( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow );
break;
case typelib_TypeClass_FLOAT:
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "a float is %f\n", *(float*)(pCppArgs[nPos]));
fprintf(stderr, "b float is %f\n", *(double*)(pCppArgs[nPos]));
#endif
INSERT_FLOAT( pCppArgs[nPos], nFPR, pFPR, nGPR, pGPR, pStack, bOverFlow );
break;
case typelib_TypeClass_DOUBLE:
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "double is %f\n", *(double*)(pCppArgs[nPos]));
#endif
INSERT_DOUBLE( pCppArgs[nPos], nFPR, pFPR, nGPR, pGPR, pStack, bOverFlow );
@@ -454,12 +454,12 @@ static void cpp_call(
}
else // ptr to complex value | ref
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex type again %d\n", rParam.bIn);
#endif
if (! rParam.bIn) // is pure out
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "complex size is %d\n", pParamTypeDescr->nSize );
#endif
// cpp out is constructed mem, uno out is not!
@@ -473,7 +473,7 @@ static void cpp_call(
// is in/inout
else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "this one\n");
#endif
uno_copyAndConvertData(
@@ -486,7 +486,7 @@ static void cpp_call(
}
else // direct way
{
-#ifdef OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
fprintf(stderr, "that one, passing %lx through\n", pUnoArgs[nPos]);
#endif
pCppArgs[nPos] = pUnoArgs[nPos];