[PATCH 05/11] Hack around different __cxa_* declarations in different GCC versions

Stephan Bergmann sbergman at redhat.com
Fri Mar 30 07:32:53 PDT 2012


(cherry picked from commit a8e489495af7b0e74c3aca256e673fa6a34b9244)

Conflicts:
	bridges/source/cpp_uno/mingw_intel/share.hxx

Change-Id: I4ff25f0e0829e46594d319adceb9b8790f717130
Signed-off-by: Michael Stahl <mstahl at redhat.com>
---
 bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 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 a02ccb2..f84958b 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
-{
-
 // -----
 
 //==================================================================================================
-- 
1.7.10.2


--------------090501060009070409060002
Content-Type: text/x-patch;
 name="0006-Adapt-cpp_uno-gcc3_linux_intel-to-GCC-4.7.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0006-Adapt-cpp_uno-gcc3_linux_intel-to-GCC-4.7.patch"



More information about the LibreOffice mailing list