Index: include/cxxabi.h =================================================================== --- include/cxxabi.h +++ include/cxxabi.h @@ -162,7 +162,8 @@ extern void __cxa_decrement_exception_refcount(void* primary_exception) throw(); // Apple addition to support std::uncaught_exception() -extern bool __cxa_uncaught_exception() throw(); +extern bool __cxa_uncaught_exception () throw(); +extern unsigned int __cxa_uncaught_exceptions() throw(); #ifdef __linux__ // Linux TLS support. Not yet an official part of the Itanium ABI. Index: src/cxa_exception.cpp =================================================================== --- src/cxa_exception.cpp +++ src/cxa_exception.cpp @@ -710,13 +710,16 @@ } bool -__cxa_uncaught_exception() throw() +__cxa_uncaught_exception() throw() { return __cxa_uncaught_exceptions() != 0; } + +unsigned int +__cxa_uncaught_exceptions() throw() { // This does not report foreign exceptions in flight __cxa_eh_globals* globals = __cxa_get_globals_fast(); if (globals == 0) return false; - return globals->uncaughtExceptions != 0; + return globals->uncaughtExceptions; } } // extern "C"