summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/atexit.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-01-07 02:32:27 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-01-07 02:32:27 +0000
commite523bd15353350c3480b8a1820a0944b0fa8212e (patch)
tree60485116f9c62c306bb753f12f9d4eb79d16aa4e /libc/stdlib/atexit.c
parent3b3434516a3415d7e0f4e1d50c553876dcb337b2 (diff)
downloaduClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.bz2
uClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.xz
Big fricking merge from trunk.
Diffstat (limited to 'libc/stdlib/atexit.c')
-rw-r--r--libc/stdlib/atexit.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c
index fcf85391a..f6944edc5 100644
--- a/libc/stdlib/atexit.c
+++ b/libc/stdlib/atexit.c
@@ -121,7 +121,7 @@ int old_atexit(aefuncp func)
&__dso_handle == NULL ? NULL : __dso_handle);
}
#ifndef L_atexit
-weak_alias(old_atexit,atexit);
+weak_alias(old_atexit,atexit)
#endif
#endif
@@ -305,7 +305,7 @@ void __exit_handler(int status)
#endif
#ifdef L_exit
-extern void weak_function _stdio_term(void);
+extern void weak_function _stdio_term(void) attribute_hidden;
void (*__exit_cleanup) (int) = 0;
#ifdef __UCLIBC_HAS_THREADS__
pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
@@ -320,7 +320,9 @@ extern void (*__rtld_fini)(void);
/*
* Normal program termination
*/
-void exit(int rv)
+#undef exit
+#undef __exit
+void attribute_hidden __exit(int rv)
{
/* Perform exit-specific cleanup (atexit and on_exit) */
LOCK;
@@ -343,6 +345,7 @@ void exit(int rv)
if (_stdio_term)
_stdio_term();
- _exit(rv);
+ _exit_internal(rv);
}
+strong_alias(__exit,exit)
#endif