Kaydet (Commit) a8e48949 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Hack around different __cxa_* declarations in different GCC versions

üst d52d3016
...@@ -76,7 +76,14 @@ struct __cxa_eh_globals ...@@ -76,7 +76,14 @@ struct __cxa_eh_globals
extern "C" CPPU_CURRENT_NAMESPACE::__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: 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 #if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
extern "C" void *__cxa_allocate_exception( extern "C" void *__cxa_allocate_exception(
std::size_t thrown_size ) throw(); std::size_t thrown_size ) throw();
...@@ -84,9 +91,6 @@ extern "C" void __cxa_throw ( ...@@ -84,9 +91,6 @@ extern "C" void __cxa_throw (
void *thrown_exception, void *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); void *thrown_exception, void *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
#endif #endif
namespace CPPU_CURRENT_NAMESPACE
{
// ----- // -----
//================================================================================================== //==================================================================================================
......
...@@ -81,7 +81,14 @@ struct __cxa_eh_globals ...@@ -81,7 +81,14 @@ struct __cxa_eh_globals
extern "C" CPPU_CURRENT_NAMESPACE::__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: 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 #if __GNUC__ == 4 && __GNUC_MINOR__ <= 6
extern "C" void *__cxa_allocate_exception( extern "C" void *__cxa_allocate_exception(
std::size_t thrown_size ) throw(); std::size_t thrown_size ) throw();
...@@ -89,9 +96,6 @@ extern "C" void __cxa_throw ( ...@@ -89,9 +96,6 @@ extern "C" void __cxa_throw (
void *thrown_exception, void *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); void *thrown_exception, void *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
#endif #endif
namespace CPPU_CURRENT_NAMESPACE
{
// ----- // -----
//================================================================================================== //==================================================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment