aboutsummaryrefslogtreecommitdiffstats
path: root/main/uclibc++/900-dependent_exception.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-08-20 14:17:19 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-08-20 16:58:04 +0000
commit32d225be6fb18e01f33546c64f3ba126fd3e9410 (patch)
tree78923a0a6e0281824ee7c88cc01f4848399cb8a4 /main/uclibc++/900-dependent_exception.patch
parent1444ddae645e1206190da7319a00413ffafd222b (diff)
downloadaports-32d225be6fb18e01f33546c64f3ba126fd3e9410.tar.bz2
aports-32d225be6fb18e01f33546c64f3ba126fd3e9410.tar.xz
main/uclibc++: import patches from openwrt
https://dev.openwrt.org/browser/packages/libs/uclibc%2B%2B/patches
Diffstat (limited to 'main/uclibc++/900-dependent_exception.patch')
-rw-r--r--main/uclibc++/900-dependent_exception.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/main/uclibc++/900-dependent_exception.patch b/main/uclibc++/900-dependent_exception.patch
new file mode 100644
index 0000000000..3a5cb7dbca
--- /dev/null
+++ b/main/uclibc++/900-dependent_exception.patch
@@ -0,0 +1,68 @@
+--- a/src/eh_alloc.cpp 2007-06-03 23:51:13.000000000 +0100
++++ b/src/eh_alloc.cpp 2009-07-13 09:42:39.000000000 +0100
+@@ -42,4 +42,21 @@
+ free( (char *)(vptr) - sizeof(__cxa_exception) );
+ }
+
++#if __GNUC__ * 100 + __GNUC_MINOR__ >= 404
++extern "C" __cxa_dependent_exception* __cxa_allocate_dependent_exception() throw(){
++ __cxa_dependent_exception *retval;
++
++ retval = static_cast<__cxa_dependent_exception*>(malloc(sizeof(__cxa_dependent_exception)));
++ if(0 == retval){
++ std::terminate();
++ }
++ memset (retval, 0, sizeof(__cxa_dependent_exception));
++ return retval ;
++}
++
++extern "C" void __cxa_free_dependent_exception(__cxa_dependent_exception *vptr) throw(){
++ free( vptr );
++}
++#endif
++
+ }
+--- a/include/unwind-cxx.h 2009-07-13 10:01:11.000000000 +0100
++++ b/include/unwind-cxx.h 2009-07-13 10:14:08.000000000 +0100
+@@ -79,6 +79,41 @@
+ _Unwind_Exception unwindHeader;
+ };
+
++#if __GNUC__ * 100 + __GNUC_MINOR__ >= 404
++// A dependent C++ exception object consists of a wrapper around an unwind
++// object header with additional C++ specific information, containing a pointer
++// to a primary exception object.
++
++struct __cxa_dependent_exception
++{
++ // The primary exception this thing depends on.
++ void *primaryException;
++
++ // The C++ standard has entertaining rules wrt calling set_terminate
++ // and set_unexpected in the middle of the exception cleanup process.
++ std::unexpected_handler unexpectedHandler;
++ std::terminate_handler terminateHandler;
++
++ // The caught exception stack threads through here.
++ __cxa_exception *nextException;
++
++ // How many nested handlers have caught this exception. A negated
++ // value is a signal that this object has been rethrown.
++ int handlerCount;
++
++ // Cache parsed handler data from the personality routine Phase 1
++ // for Phase 2 and __cxa_call_unexpected.
++ int handlerSwitchValue;
++ const unsigned char *actionRecord;
++ const unsigned char *languageSpecificData;
++ _Unwind_Ptr catchTemp;
++ void *adjustedPtr;
++
++ // The generic exception header. Must be last.
++ _Unwind_Exception unwindHeader;
++};
++
++#endif
+ // Each thread in a C++ program has access to a __cxa_eh_globals object.
+ struct __cxa_eh_globals
+ {