From c6deb130aea0909a9de37e228a50f5d9faa0d963 Mon Sep 17 00:00:00 2001 From: cgd Date: Wed, 24 Jan 2001 03:03:12 +0000 Subject: 2001-01-23 Chris Demetriou * libgcc-std.ver (GCC_3.0): Add __terminate_func_set to list of EH symbols. * libgcc2.c (__terminate_func): Make variable static. (__terminate_set_func): New function to set __terminate_func. * libgcc2.h (__terminate_func_ptr): New typedef. (__terminate_set_func): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39224 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/libgcc2.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/libgcc2.c') diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index cf6822bb565..5e5d7c01339 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -3143,7 +3143,7 @@ __default_terminate (void) abort (); } -void (*__terminate_func)(void) __attribute__ ((__noreturn__)) = +static __terminate_func_ptr __terminate_func = __default_terminate; void __attribute__((__noreturn__)) @@ -3152,6 +3152,15 @@ __terminate (void) (*__terminate_func)(); } +__terminate_func_ptr +__terminate_set_func (__terminate_func_ptr newfunc) +{ + __terminate_func_ptr oldfunc = __terminate_func; + + __terminate_func = newfunc; + return (oldfunc); +} + void * __throw_type_match (void *catch_type, void *throw_type, void *obj) { -- cgit v1.2.3