summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-22 21:08:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-22 21:09:55 +0100
commitaf73a28e8538f5b2df6bbfd592d8987511520d4d (patch)
treefb68e55c555e132929cc85da32d72d6011266841 /bridges
parent234fba5b451394cba39adc623f8e303845790605 (diff)
if _CALL_ELF -> if defined(_CALL_ELF) && _CALL_ELF == 2
Change-Id: I34e9a98586b795a3fa31ae775aee7898b36e65d4
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx10
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx8
2 files changed, 9 insertions, 9 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index 35cc16f3d373..430999ff2c77 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -326,7 +326,7 @@ static typelib_TypeClass cpp2uno_call(
}
}
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
# define PARAMSAVE 32
#else
# define PARAMSAVE 48
@@ -545,7 +545,7 @@ extern "C" void privateSnippetExecutor( ... )
"mr %0, 1\n\t"
: "=r" (sp) : );
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
volatile long nRegReturn[2];
#else
volatile long nRegReturn[1];
@@ -592,7 +592,7 @@ extern "C" void privateSnippetExecutor( ... )
default:
__asm__( "ld 3,%0\n\t"
: : "m" (nRegReturn[0]) );
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
__asm__( "ld 4,%0\n\t"
: : "m" (nRegReturn[1]) );
#endif
@@ -600,7 +600,7 @@ extern "C" void privateSnippetExecutor( ... )
}
}
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
const int codeSnippetSize = 32;
#else
const int codeSnippetSize = 24;
@@ -618,7 +618,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sa
if ( bHasHiddenParam )
nOffsetAndIndex |= 0x80000000;
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
unsigned int *raw = (unsigned int *)&code[0];
raw[0] = 0xe96c0018; /* 0: ld 11,2f-0b(12) */
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 391ef219ac27..cfe720dfc440 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -39,7 +39,7 @@ using namespace ::com::sun::star::uno;
namespace ppc64
{
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
bool is_complex_struct(const typelib_TypeDescription * type)
{
const typelib_CompoundTypeDescription * p
@@ -70,7 +70,7 @@ namespace ppc64
{
if (bridges::cpp_uno::shared::isSimpleType(pTypeRef))
return false;
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
{
typelib_TypeDescription * pTypeDescr = 0;
@@ -115,7 +115,7 @@ void MapReturn(long r3, long r4, double dret, typelib_TypeDescriptionReference*
case typelib_TypeClass_DOUBLE:
*reinterpret_cast<double *>( pRegisterReturn ) = dret;
break;
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION:
if (!ppc64::return_in_hidden_param(pReturnType))
@@ -175,7 +175,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
pMethod += 8 * nVtableIndex;
pMethod = *((sal_uInt64 *)pMethod);
-#if _CALL_ELF == 2
+#if defined(_CALL_ELF) && _CALL_ELF == 2
typedef void (* FunctionCall )(...);
#else
typedef void (* FunctionCall )( sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64 );