summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/exit.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-12-19 17:11:21 +0000
committerkan <kan@FreeBSD.org>2003-12-19 17:11:21 +0000
commit09cff1552677af476e36b9a7eaa9c19cc59babab (patch)
treeefbabd11f110e786f47c858d0d07235825295adc /lib/libc/stdlib/exit.c
parentcaabe905470f909266101f4eae7e6651e6c58083 (diff)
downloadFreeBSD-src-09cff1552677af476e36b9a7eaa9c19cc59babab.zip
FreeBSD-src-09cff1552677af476e36b9a7eaa9c19cc59babab.tar.gz
Implement __cxa_atexit/__cxa_finalize as specified by the cross-vendor
รณ++ ABI document at http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor The ABI was initially defined for ia64, but GCC3 and Intel compilers have adopted it on other platforms. This is the patch from PR bin/59552 with a number of changes by me. PR: bin/59552 Submitted by: Bradley T Hughes (bhughes at trolltech dot com)
Diffstat (limited to 'lib/libc/stdlib/exit.c')
-rw-r--r--lib/libc/stdlib/exit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/libc/stdlib/exit.c b/lib/libc/stdlib/exit.c
index 78c5f36..83abdbd 100644
--- a/lib/libc/stdlib/exit.c
+++ b/lib/libc/stdlib/exit.c
@@ -61,17 +61,12 @@ void
exit(status)
int status;
{
- struct atexit *p;
- int n;
-
/* Ensure that the auto-initialization routine is linked in: */
extern int _thread_autoinit_dummy_decl;
_thread_autoinit_dummy_decl = 1;
- for (p = __atexit; p; p = p->next)
- for (n = p->ind; --n >= 0;)
- (*p->fns[n])();
+ __cxa_finalize(NULL);
if (__cleanup)
(*__cleanup)();
_exit(status);
OpenPOWER on IntegriCloud