Commit 93982b79 by Chris Demetriou Committed by Chris Demetriou

exception.cc (__terminate_func): Remove declaration.

2001-01-23  Chris Demetriou  <cgd@broadcom.com>

        * exception.cc (__terminate_func): Remove declaration.
        (__terminate_func_ptr): New typedef.
        (__terminate, __terminate_set_func): New extern function
        prototypes.
        (std::terminate): Use __terminate function.
        (std::set_terminate): Use __terminate_set_func function.

From-SVN: r39225
parent 8a1894ac
2001-01-23 Chris Demetriou <cgd@broadcom.com>
* exception.cc (__terminate_func): Remove declaration.
(__terminate_func_ptr): New typedef.
(__terminate, __terminate_set_func): New extern function
prototypes.
(std::terminate): Use __terminate function.
(std::set_terminate): Use __terminate_set_func function.
2000-11-24 Magnus Fromreide <magfr@lysator.liu.se> 2000-11-24 Magnus Fromreide <magfr@lysator.liu.se>
* sstream: Backport libstdc++-V3 sstream to V2. * sstream: Backport libstdc++-V3 sstream to V2.
......
...@@ -38,13 +38,17 @@ ...@@ -38,13 +38,17 @@
/* Define terminate, unexpected, set_terminate, set_unexpected as /* Define terminate, unexpected, set_terminate, set_unexpected as
well as the default terminate func and default unexpected func. */ well as the default terminate func and default unexpected func. */
extern std::terminate_handler __terminate_func __attribute__((__noreturn__)); /* __terminate and __terminate_set_func, defined in libgcc2. */
typedef void (*__terminate_func_ptr)(void) __attribute__ ((__noreturn__));
extern "C" void __terminate (void) __attribute__ ((__noreturn__));
extern "C" __terminate_func_ptr __terminate_set_func (__terminate_func_ptr);
using std::terminate; using std::terminate;
void void
std::terminate () std::terminate ()
{ {
__terminate_func (); __terminate ();
} }
void void
...@@ -59,10 +63,7 @@ static std::unexpected_handler __unexpected_func __attribute__((__noreturn__)) ...@@ -59,10 +63,7 @@ static std::unexpected_handler __unexpected_func __attribute__((__noreturn__))
std::terminate_handler std::terminate_handler
std::set_terminate (std::terminate_handler func) std::set_terminate (std::terminate_handler func)
{ {
std::terminate_handler old = __terminate_func; return __terminate_set_func (func);
__terminate_func = func;
return old;
} }
std::unexpected_handler std::unexpected_handler
......
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