summaryrefslogtreecommitdiff
path: root/libc/stdlib/abort.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-02-18 10:12:45 +0000
committerEric Andersen <andersen@codepoet.org>2002-02-18 10:12:45 +0000
commita7941d4f375573864334e1002aed2880ae47fa6a (patch)
treed2222e9f68dc627ea4418148f79d67406b967de4 /libc/stdlib/abort.c
parent623b520a8115c6a2bd1af9c13c9e1ace924cf7e6 (diff)
Rename __stdio_close_all to __stdio_flush_buffers. Eliminate an
unnecessary variable
Diffstat (limited to 'libc/stdlib/abort.c')
-rw-r--r--libc/stdlib/abort.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c
index 3ff235ae3..4c9f06a11 100644
--- a/libc/stdlib/abort.c
+++ b/libc/stdlib/abort.c
@@ -46,8 +46,7 @@ Cambridge, MA 02139, USA. */
#define ABORT_INSTRUCTION
#endif
-typedef void (*vfuncp) (void);
-extern vfuncp __uClibc_cleanup;
+extern void __stdio_flush_buffers(void);
extern void _exit __P((int __status)) __attribute__ ((__noreturn__));
static int been_there_done_that = 0;
@@ -61,10 +60,9 @@ void abort(void)
sigprocmask(SIG_UNBLOCK, &sigset, (sigset_t *) NULL);
}
- /* __uClibc_cleanup NULLs itself out after being called */
- if (__uClibc_cleanup) {
- __uClibc_cleanup();
- }
+ /* If we are using stdio, flush all open streams */
+ if (__stdio_flush_buffers)
+ __stdio_flush_buffers();
while (1) {
/* Try to suicide with a SIGABRT. */