diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-19 23:37:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-19 23:38:14 +0100 |
commit | f5f0758080b0da61e3d2088804cad0b0ed94d21d (patch) | |
tree | 67a56fa95ef4e5c4c1e3368459c133ced3b4ff66 /bridges | |
parent | 8617010b851e000f336cf647f207557b5eeab8b7 (diff) |
Revert "hack for now"
This reverts commit f5792667cafef77cc4c142f4261f8b64280bc0fe.
it turns out it was the use of an intermediate GtkGrid which made a11y work
a little differently under gtk3. Clearly not intended to be pushed.
Change-Id: I6931163e07ea413acdd45ba1353f357d317fdfbd
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_intel/share.hxx | 19 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx | 4 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx | 172 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx | 10 | ||||
-rw-r--r-- | bridges/source/cpp_uno/msvc_win32_intel/except.cxx | 1 |
5 files changed, 107 insertions, 99 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx index 512ae6db2c03..f97e81e419eb 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx @@ -27,8 +27,9 @@ #ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h #define _GLIBCXX_CDTOR_CALLABI #endif +#include <unwind.h> -#include "config_gcc.h" +#include "config_cxxabi.h" #include <uno/any2.h> #include "uno/mapping.h" @@ -37,15 +38,7 @@ namespace CPPU_CURRENT_NAMESPACE void dummy_can_throw_anything( char const * ); -// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h - -struct _Unwind_Exception -{ - unsigned exception_class __attribute__((__mode__(__DI__))); - void * exception_cleanup; - unsigned private_1 __attribute__((__mode__(__word__))); - unsigned private_2 __attribute__((__mode__(__word__))); -} __attribute__((__aligned__)); +// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h struct __cxa_exception { @@ -87,17 +80,17 @@ struct __cxa_eh_globals // __cxa_allocate_exception and __cxa_throw, though they do not have the // additional problem of an incompletely declared return type: -#if !HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS +#if !HAVE_CXXABI_H_CXA_GET_GLOBALS namespace __cxxabiv1 { extern "C" void * __cxa_get_globals() throw(); } #endif -#if !HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION +#if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION namespace __cxxabiv1 { extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw(); } #endif -#if !HAVE_GCC_CXXABI_H_CXA_THROW +#if !HAVE_CXXABI_H_CXA_THROW namespace __cxxabiv1 { extern "C" void __cxa_throw( void * thrown_exception, void * tinfo, void (* dest)(void *)) 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 5efd7cb752e8..04d13e80c748 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx @@ -81,7 +81,7 @@ static OUString toUNOname( char const * p ) extern "C" { static void _GLIBCXX_CDTOR_CALLABI deleteException( void * pExc ) { - __cxa_exception const * header = (static_cast<__cxa_exception const *>(pExc) - 1); + __cxxabiv1::__cxa_exception const * header = (static_cast<__cxxabiv1::__cxa_exception const *>(pExc) - 1); typelib_TypeDescription * pTD = nullptr; OUString unoName( toUNOname( header->exceptionType->name() ) ); ::typelib_typedescription_getByName( &pTD, unoName.pData ); @@ -138,7 +138,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) __cxxabiv1::__cxa_throw( pCppExc, rtti, deleteException ); } -void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno ) +void fillUnoException( __cxxabiv1::__cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno ) { if (! header) { 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 96ddfc0be0b3..bac7ef6fec15 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx @@ -27,101 +27,129 @@ #ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h #define _GLIBCXX_CDTOR_CALLABI #endif +#include <unwind.h> -#include "config_gcc.h" +#include "config_cxxabi.h" #include "uno/any2.h" #include "uno/mapping.h" -#ifdef _LIBCPP_VERSION - -namespace __cxxabiv1 -{ - struct __class_type_info : public std::type_info - { - explicit __class_type_info( const char *__n ) : type_info( __n ) { } - virtual ~__class_type_info(); - }; - - struct __si_class_type_info : public __class_type_info - { - explicit __si_class_type_info( const char *__n, const __class_type_info *__b ) : - __class_type_info( __n ), __base_type( __b ) { } - virtual ~__si_class_type_info(); - const __class_type_info *__base_type; - }; - -extern "C" void *__cxa_allocate_exception( std::size_t thrown_size ) _NOEXCEPT; +#if !HAVE_CXXABI_H_CLASS_TYPE_INFO +// <https://mentorembedded.github.io/cxx-abi/abi.html>, +// libstdc++-v3/libsupc++/cxxabi.h: +namespace __cxxabiv1 { +class __class_type_info: public std::type_info { +public: + explicit __class_type_info(char const * n): type_info(n) {} + ~__class_type_info() override; +}; +} +#endif -extern "C" _LIBCPP_NORETURN void __cxa_throw( - void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ); +#if !HAVE_CXXABI_H_SI_CLASS_TYPE_INFO +// <https://mentorembedded.github.io/cxx-abi/abi.html>, +// libstdc++-v3/libsupc++/cxxabi.h: +namespace __cxxabiv1 { +class __si_class_type_info: public __class_type_info { +public: + __class_type_info const * __base_type; + explicit __si_class_type_info( + char const * n, __class_type_info const *base): + __class_type_info(n), __base_type(base) {} + ~__si_class_type_info() override; +}; } +#endif +#if !HAVE_CXXABI_H_BASE_CLASS_TYPE_INFO +// <https://mentorembedded.github.io/cxx-abi/abi.html>, +// libstdc++-v3/libsupc++/cxxabi.h: +namespace __cxxabiv1 { +struct __base_class_type_info { + __class_type_info const * __base_type; +#if defined _GLIBCXX_LLP64 + long long __offset_flags; #else + long __offset_flags; +#endif + enum __offset_flags_masks { + __virtual_mask = 0x1, + __public_mask = 0x2, + __offset_shift = 8 + }; +}; +} +#endif -namespace CPPU_CURRENT_NAMESPACE -{ - -// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h - -struct _Unwind_Exception -{ - unsigned exception_class __attribute__((__mode__(__DI__))); - void * exception_cleanup; - unsigned private_1 __attribute__((__mode__(__word__))); - unsigned private_2 __attribute__((__mode__(__word__))); -} __attribute__((__aligned__)); - -struct __cxa_exception -{ - ::std::type_info *exceptionType; - void (*exceptionDestructor)(void *); - - ::std::unexpected_handler unexpectedHandler; - ::std::terminate_handler terminateHandler; - - __cxa_exception *nextException; +#if !HAVE_CXXABI_H_VMI_CLASS_TYPE_INFO +// <https://mentorembedded.github.io/cxx-abi/abi.html>, +// libstdc++-v3/libsupc++/cxxabi.h: +namespace __cxxabiv1 { +class __vmi_class_type_info: public __class_type_info { +public: + unsigned int __flags; + unsigned int __base_count; + __base_class_type_info __base_info[1]; + enum __flags_masks { + __non_diamond_repeat_mask = 0x1, + __diamond_shaped_mask = 0x2, + __flags_unknown_mask = 0x10 + }; + explicit __vmi_class_type_info(char const * n, int flags): + __class_type_info(n), __flags(flags), __base_count(0) {} + ~__vmi_class_type_info() override; +}; +} +#endif +#if !HAVE_CXXABI_H_CXA_EH_GLOBALS +// <https://mentorembedded.github.io/cxx-abi/abi-eh.html>, +// libcxxabi/src/cxa_exception.hpp: +namespace __cxxabiv1 { +struct __cxa_exception { +#if defined _LIBCPPABI_VERSION // detect libc++abi +#if defined __LP64__ || LIBCXXABI_ARM_EHABI + std::size_t referenceCount; +#endif +#endif + std::type_info * exceptionType; + void (* exceptionDestructor)(void *); + std::unexpected_handler unexpectedHandler; + std::terminate_handler terminateHandler; + __cxa_exception * nextException; int handlerCount; - int handlerSwitchValue; - const unsigned char *actionRecord; - const unsigned char *languageSpecificData; - void *catchTemp; - void *adjustedPtr; - + char const * actionRecord; + char const * languageSpecificData; + void * catchTemp; + void * adjustedPtr; _Unwind_Exception unwindHeader; }; +} +#endif -struct __cxa_eh_globals -{ - __cxa_exception *caughtExceptions; +#if !HAVE_CXXABI_H_CXA_EH_GLOBALS +// <https://mentorembedded.github.io/cxx-abi/abi-eh.html>: +namespace __cxxabiv1 { +struct __cxa_eh_globals { + __cxa_exception * caughtExceptions; unsigned int uncaughtExceptions; }; - } +#endif -// __cxa_get_globals is exported from libstdc++ since GCC 3.4.0 (CXXABI_1.3), -// but it is only declared in cxxabi.h (in namespace __cxxabiv1) since -// GCC 4.7.0. It returns a pointer to a struct __cxa_eh_globals, but that -// struct is only incompletely declared even in the GCC 4.7.0 cxxabi.h. -// Therefore, provide a declaration here for old GCC (libstdc++, really) version -// that returns a void pointer, and in the code calling it always cast to the -// above fake definition of CPPU_CURRENT_NAMESPACE::__cxa_eh_globals (which -// hopefully keeps matching the real definition in libstdc++); similarly for -// __cxa_allocate_exception and __cxa_throw, though they do not have the -// additional problem of an incompletely declared return type: - -#if !HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS -namespace __cxxabiv1 { extern "C" void * __cxa_get_globals() throw(); } +#if !HAVE_CXXABI_H_CXA_GET_GLOBALS +namespace __cxxabiv1 { +extern "C" __cxa_eh_globals * __cxa_get_globals() throw(); +} #endif -#if !HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION +#if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION namespace __cxxabiv1 { extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw(); } #endif -#if !HAVE_GCC_CXXABI_H_CXA_THROW +#if !HAVE_CXXABI_H_CXA_THROW namespace __cxxabiv1 { extern "C" void __cxa_throw( void * thrown_exception, void * tinfo, void (* dest)(void *)) @@ -129,8 +157,6 @@ extern "C" void __cxa_throw( } #endif -#endif - extern "C" void privateSnippetExecutor( ... ); namespace CPPU_CURRENT_NAMESPACE @@ -140,11 +166,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ); void fillUnoException( -#ifdef _LIBCPP_VERSION __cxxabiv1::__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno ); -#else - __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno ); -#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 f65ac57f0002..71e76a9f3b09 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx @@ -294,17 +294,9 @@ static void cpp_call( catch (...) { // fill uno exception -#ifdef _LIBCPP_VERSION CPPU_CURRENT_NAMESPACE::fillUnoException( - reinterpret_cast< __cxxabiv1::__cxa_eh_globals * >( - __cxxabiv1::__cxa_get_globals())->caughtExceptions, + __cxxabiv1::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno()); -#else - fillUnoException( - reinterpret_cast< CPPU_CURRENT_NAMESPACE::__cxa_eh_globals * >( - __cxxabiv1::__cxa_get_globals())->caughtExceptions, - *ppUnoExc, pThis->getBridge()->getCpp2Uno()); -#endif // temporary params for ( ; nTempIndices--; ) diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx index 8dd8810a5f11..d6c6271802c7 100644 --- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx +++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx @@ -28,6 +28,7 @@ #include "rtl/strbuf.hxx" #include "rtl/ustrbuf.hxx" #include <sal/log.hxx> +#include <osl/mutex.hxx> #include "com/sun/star/uno/Any.hxx" #include <unordered_map> |