summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-03-30 16:32:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-03-30 16:41:06 +0200
commita8e489495af7b0e74c3aca256e673fa6a34b9244 (patch)
treee0eb64930d92f3854e8e7801922a73f7abcca276 /bridges
parentd52d301660df47527a69c12bca49bb4e0199b4f5 (diff)
Hack around different __cxa_* declarations in different GCC versions
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx12
-rw-r--r--bridges/source/cpp_uno/mingw_intel/share.hxx12
2 files changed, 16 insertions, 8 deletions
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 a02ccb29b967..f84958b96368 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -76,7 +76,14 @@ struct __cxa_eh_globals
extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals *__cxa_get_globals () throw();
-// The following are in cxxabi.h since GCC 4.7:
+namespace CPPU_CURRENT_NAMESPACE
+{
+
+// The following are in cxxabi.h since GCC 4.7 (they are wrapped in
+// CPPU_CURRENT_NAMESPACE here as different GCC versions have slightly different
+// declarations for them, e.g., with or without throw() specification, so would
+// complain about redeclarations of these somewhat implicitly declared
+// functions):
#if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
extern "C" void *__cxa_allocate_exception(
std::size_t thrown_size ) throw();
@@ -84,9 +91,6 @@ 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/mingw_intel/share.hxx b/bridges/source/cpp_uno/mingw_intel/share.hxx
index e813f49b7ba6..46252e4f847a 100644
--- a/bridges/source/cpp_uno/mingw_intel/share.hxx
+++ b/bridges/source/cpp_uno/mingw_intel/share.hxx
@@ -81,7 +81,14 @@ struct __cxa_eh_globals
extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals *__cxa_get_globals () throw();
-// The following are in cxxabi.h since GCC 4.7:
+namespace CPPU_CURRENT_NAMESPACE
+{
+
+// The following are in cxxabi.h since GCC 4.7 (they are wrapped in
+// CPPU_CURRENT_NAMESPACE here as different GCC versions have slightly different
+// declarations for them, e.g., with or without throw() specification, so would
+// complain about redeclarations of these somewhat implicitly declared
+// functions):
#if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
extern "C" void *__cxa_allocate_exception(
std::size_t thrown_size ) throw();
@@ -89,9 +96,6 @@ extern "C" void __cxa_throw (
void *thrown_exception, void *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
#endif
-namespace CPPU_CURRENT_NAMESPACE
-{
-
// -----
//==================================================================================================