From dfe2d42547de8197f850f3ff0dfdc3caa4682518 Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Mon, 19 Feb 2001 00:24:52 +0000 Subject: Create __uClibc_main to handle what can be done in C instead of each arch's respective crt0.S. crt0.S should now only be responsible for setting things up to call __uClibc_main(argc, argv, envp), which will do any other necessary setup (setting global __environ, stdio init, etc), call main, and exit. This should ease both maintainance and porting. --- libc/stdlib/abort.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libc/stdlib/abort.c') diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c index 23510e913..7b7d6bb50 100644 --- a/libc/stdlib/abort.c +++ b/libc/stdlib/abort.c @@ -25,8 +25,8 @@ Cambridge, MA 02139, USA. */ #include #include -typedef void (*vfuncp) (); -extern vfuncp __cleanup; +typedef void (*vfuncp) (void); +extern vfuncp __uClibc_cleanup; extern void _exit __P((int __status)) __attribute__ ((__noreturn__)); /* Cause an abnormal program termination with core-dump. */ @@ -38,8 +38,9 @@ void abort(void) sigprocmask(SIG_UNBLOCK, &sigset, (sigset_t *) NULL); } - if (__cleanup) - __cleanup(); + if (__uClibc_cleanup) { /* Not already executing __uClibc_cleanup. */ + __uClibc_cleanup(); + } while (1) if (raise(SIGABRT)) -- cgit v1.2.3