[Libreoffice-commits] .: 2 commits - bridges/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Fri Mar 30 05:05:35 PDT 2012


 bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx |    1 
 bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx |    1 
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx            |    9 +++-
 bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx             |   21 +++++++---
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx           |    2 
 5 files changed, 26 insertions(+), 8 deletions(-)

New commits:
commit 166be18da0686f2c445f521e3f1a83db8a3c3360
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 30 14:01:23 2012 +0200

    Missing includes

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
index 901265d..57d0395 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
@@ -30,6 +30,7 @@
 
 #include <cstring>
 
+#include "cppu/macros.hxx"
 #include "sal/types.h"
 #include "typelib/typeclass.h"
 #include "typelib/typedescription.h"
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx
index adc05ed..2a776b9 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx
@@ -31,6 +31,7 @@
 
 #include "sal/config.h"
 
+#include "cppu/macros.hxx"
 #include "sal/types.h"
 #include "typelib/typedescription.h"
 
commit fa09866ccb5bc197ad3e1ec1a453d6fab20cd7df
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 30 13:58:34 2012 +0200

    Adapt cpp_uno/gcc3_linux_x86-64 to GCC 4.7 cxxabi.h
    
    ...the same way cpp_uno/mingw_intel was already adapted.

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
index 08e681d..8373d14 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
@@ -30,7 +30,12 @@
 #include <stdio.h>
 #include <string.h>
 #include <dlfcn.h>
+
 #include <cxxabi.h>
+#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
+#define _GLIBCXX_CDTOR_CALLABI
+#endif
+
 #include <boost/unordered_map.hpp>
 
 #include <rtl/instance.hxx>
@@ -213,7 +218,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
 struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
 
 //--------------------------------------------------------------------------------------------------
-static void deleteException( void * pExc )
+extern "C" {
+static void _GLIBCXX_CDTOR_CALLABI deleteException( void * pExc )
 {
     __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
     typelib_TypeDescription * pTD = 0;
@@ -226,6 +232,7 @@ static void deleteException( void * pExc )
         ::typelib_typedescription_release( pTD );
     }
 }
+}
 
 //==================================================================================================
 void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
index b01ae9e..a02ccb2 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -66,17 +66,26 @@ struct __cxa_exception
     _Unwind_Exception unwindHeader;
 };
 
-extern "C" void *__cxa_allocate_exception(
-    std::size_t thrown_size ) throw();
-extern "C" void __cxa_throw (
-    void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
-
 struct __cxa_eh_globals
 {
     __cxa_exception *caughtExceptions;
     unsigned int uncaughtExceptions;
 };
-extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+
+}
+
+extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals *__cxa_get_globals () throw();
+
+// The following are in cxxabi.h since GCC 4.7:
+#if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
+extern "C" void *__cxa_allocate_exception(
+    std::size_t thrown_size ) throw();
+extern "C" void __cxa_throw (
+    void *thrown_exception, void *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
+#endif
+
+namespace CPPU_CURRENT_NAMESPACE
+{
 
 // -----
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index a9abb5c..ff6fbdd 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -300,7 +300,7 @@ static void cpp_call(
      catch (...)
      {
           // fill uno exception
-        fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
+        fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
 
         // temporary params
         for ( ; nTempIndizes--; )


More information about the Libreoffice-commits mailing list