Blame SOURCES/0001-if-_CALL_ELF-if-defined-_CALL_ELF-_CALL_ELF-2.patch

f085be
From af73a28e8538f5b2df6bbfd592d8987511520d4d Mon Sep 17 00:00:00 2001
f085be
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
f085be
Date: Fri, 22 Aug 2014 21:08:47 +0100
f085be
Subject: [PATCH] if _CALL_ELF -> if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
f085be
Change-Id: I34e9a98586b795a3fa31ae775aee7898b36e65d4
f085be
---
f085be
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx | 10 +++++-----
f085be
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |  8 ++++----
f085be
 2 files changed, 9 insertions(+), 9 deletions(-)
f085be
f085be
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
f085be
index 35cc16f..430999f 100644
f085be
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
f085be
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
f085be
@@ -326,7 +326,7 @@ static typelib_TypeClass cpp2uno_call(
f085be
     }
f085be
 }
f085be
 
f085be
-#if _CALL_ELF == 2
f085be
+#if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
 #  define PARAMSAVE 32
f085be
 #else
f085be
 #  define PARAMSAVE 48
f085be
@@ -545,7 +545,7 @@ extern "C" void privateSnippetExecutor( ... )
f085be
                 "mr     %0,    1\n\t"
f085be
                 : "=r" (sp) : );
f085be
 
f085be
-#if _CALL_ELF == 2
f085be
+#if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
     volatile long nRegReturn[2];
f085be
 #else
f085be
     volatile long nRegReturn[1];
f085be
@@ -592,7 +592,7 @@ extern "C" void privateSnippetExecutor( ... )
f085be
         default:
f085be
             __asm__( "ld 3,%0\n\t"
f085be
                 : : "m" (nRegReturn[0]) );
f085be
-#if _CALL_ELF == 2
f085be
+#if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
             __asm__( "ld 4,%0\n\t"
f085be
                 : : "m" (nRegReturn[1]) );
f085be
 #endif
f085be
@@ -600,7 +600,7 @@ extern "C" void privateSnippetExecutor( ... )
f085be
     }
f085be
 }
f085be
 
f085be
-#if _CALL_ELF == 2
f085be
+#if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
 const int codeSnippetSize = 32;
f085be
 #else
f085be
 const int codeSnippetSize = 24;
f085be
@@ -618,7 +618,7 @@ unsigned char *  codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sa
f085be
 
f085be
     if ( bHasHiddenParam )
f085be
         nOffsetAndIndex |= 0x80000000;
f085be
-#if _CALL_ELF == 2
f085be
+#if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
     unsigned int *raw = (unsigned int *)&code[0];
f085be
 
f085be
     raw[0] = 0xe96c0018;        /* 0:   ld      11,2f-0b(12)    */
f085be
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
f085be
index 391ef219..cfe720d 100644
f085be
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
f085be
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
f085be
@@ -39,7 +39,7 @@ using namespace ::com::sun::star::uno;
f085be
 
f085be
 namespace ppc64
f085be
 {
f085be
-#if _CALL_ELF == 2
f085be
+#if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
     bool is_complex_struct(const typelib_TypeDescription * type)
f085be
     {
f085be
         const typelib_CompoundTypeDescription * p
f085be
@@ -70,7 +70,7 @@ namespace ppc64
f085be
     {
f085be
         if (bridges::cpp_uno::shared::isSimpleType(pTypeRef))
f085be
             return false;
f085be
-#if _CALL_ELF == 2
f085be
+#if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
         else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
f085be
         {
f085be
             typelib_TypeDescription * pTypeDescr = 0;
f085be
@@ -115,7 +115,7 @@ void MapReturn(long r3, long r4, double dret, typelib_TypeDescriptionReference*
f085be
     case typelib_TypeClass_DOUBLE:
f085be
             *reinterpret_cast<double *>( pRegisterReturn ) = dret;
f085be
             break;
f085be
-#if _CALL_ELF == 2
f085be
+#if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
     case typelib_TypeClass_STRUCT:
f085be
     case typelib_TypeClass_EXCEPTION:
f085be
             if (!ppc64::return_in_hidden_param(pReturnType))
f085be
@@ -175,7 +175,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
f085be
     pMethod += 8 * nVtableIndex;
f085be
     pMethod = *((sal_uInt64 *)pMethod);
f085be
 
f085be
-#if _CALL_ELF == 2
f085be
+#if defined(_CALL_ELF) && _CALL_ELF == 2
f085be
     typedef void (* FunctionCall )(...);
f085be
 #else
f085be
     typedef void (* FunctionCall )( sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64 );
f085be
-- 
f085be
1.9.3
f085be