diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-09-13 20:20:45 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-09-13 20:21:07 +0200 |
commit | 4fa8282816cb39692678e9da6b6693e821a3039b (patch) | |
tree | 7da85a2aa31b851d782acca5bc1f683c23280e37 /bridges | |
parent | 100805844ab3371553803b0b05d3a41a42da7a3a (diff) |
mac: clean-up obsolete conditional code based on old SDK
Change-Id: Ie2d476780a48b5815961598e214343d5def962c1
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx | 30 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx | 30 |
2 files changed, 4 insertions, 56 deletions
diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx index adbddd7cf1cb..75fdbc7b9b6b 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx @@ -27,13 +27,6 @@ #include <dlfcn.h> -// MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined -// __cxxabiv1::__class_type_info and __cxxabiv1::__si_class_type_info but -// MacOSX10.7.sdk/usr/include/cxxabi.h no longer does: -#if MACOSX_SDK_VERSION < 1070 -#include <cxxabi.h> -#endif - #include "boost/static_assert.hpp" #include "boost/unordered_map.hpp" #include "com/sun/star/uno/RuntimeException.hpp" @@ -61,31 +54,16 @@ struct Fake_type_info { struct Fake_class_type_info: Fake_type_info {}; -#if MACOSX_SDK_VERSION < 1070 -BOOST_STATIC_ASSERT( - sizeof (Fake_class_type_info) == sizeof (__cxxabiv1::__class_type_info)); -#endif - struct Fake_si_class_type_info: Fake_class_type_info { void const * base; }; -#if MACOSX_SDK_VERSION < 1070 -BOOST_STATIC_ASSERT( - sizeof (Fake_si_class_type_info) - == sizeof (__cxxabiv1::__si_class_type_info)); -#endif - struct Base {}; struct Derived: Base {}; std::type_info * createFake_class_type_info(char const * name) { char * buf = new char[sizeof (Fake_class_type_info)]; -#if MACOSX_SDK_VERSION < 1070 - assert( - dynamic_cast<__cxxabiv1::__class_type_info const *>(&typeid(Base)) - != 0); -#endif + *reinterpret_cast<void **>(buf) = *reinterpret_cast<void * const *>( &typeid(Base)); // copy __cxxabiv1::__class_type_info vtable into place @@ -99,11 +77,7 @@ std::type_info * createFake_si_class_type_info( char const * name, std::type_info const * base) { char * buf = new char[sizeof (Fake_si_class_type_info)]; -#if MACOSX_SDK_VERSION < 1070 - assert( - dynamic_cast<__cxxabiv1::__si_class_type_info const *>(&typeid(Derived)) - != 0); -#endif + *reinterpret_cast<void **>(buf) = *reinterpret_cast<void * const *>( &typeid(Derived)); // copy __cxxabiv1::__si_class_type_info vtable into place diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx index 83b06c5161f3..f224c22b57cf 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx @@ -27,13 +27,6 @@ #include <dlfcn.h> -// MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined -// __cxxabiv1::__class_type_info and __cxxabiv1::__si_class_type_info but -// MacOSX10.7.sdk/usr/include/cxxabi.h no longer does: -#if MACOSX_SDK_VERSION < 1070 -#include <cxxabi.h> -#endif - #include "boost/static_assert.hpp" #include "boost/unordered_map.hpp" #include "com/sun/star/uno/RuntimeException.hpp" @@ -63,32 +56,17 @@ struct Fake_class_type_info: Fake_type_info { virtual ~Fake_class_type_info() SAL_DELETED_FUNCTION; }; -#if MACOSX_SDK_VERSION < 1070 -BOOST_STATIC_ASSERT( - sizeof (Fake_class_type_info) == sizeof (__cxxabiv1::__class_type_info)); -#endif - struct Fake_si_class_type_info: Fake_class_type_info { virtual ~Fake_si_class_type_info() SAL_DELETED_FUNCTION; void const * base; }; -#if MACOSX_SDK_VERSION < 1070 -BOOST_STATIC_ASSERT( - sizeof (Fake_si_class_type_info) - == sizeof (__cxxabiv1::__si_class_type_info)); -#endif - struct Base {}; struct Derived: Base {}; std::type_info * createFake_class_type_info(char const * name) { char * buf = new char[sizeof (Fake_class_type_info)]; -#if MACOSX_SDK_VERSION < 1070 - assert( - dynamic_cast<__cxxabiv1::__class_type_info const *>(&typeid(Base)) - != 0); -#endif + *reinterpret_cast<void **>(buf) = *reinterpret_cast<void * const *>( &typeid(Base)); // copy __cxxabiv1::__class_type_info vtable into place @@ -102,11 +80,7 @@ std::type_info * createFake_si_class_type_info( char const * name, std::type_info const * base) { char * buf = new char[sizeof (Fake_si_class_type_info)]; -#if MACOSX_SDK_VERSION < 1070 - assert( - dynamic_cast<__cxxabiv1::__si_class_type_info const *>(&typeid(Derived)) - != 0); -#endif + *reinterpret_cast<void **>(buf) = *reinterpret_cast<void * const *>( &typeid(Derived)); // copy __cxxabiv1::__si_class_type_info vtable into place |