From 58d6976a6e8cf1af0cf2747d5b8caa05eb765487 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 8 Jun 2010 18:44:14 +0000 Subject: 2010-06-08 Jeff Johnston * configure.in: Add test for enable-newlib-register-fini to set the _WANT_REGISTER_FINI flag. * configure: Regenerated. * Makefile.in: Ditto. * newlib.hin: Add _WANT_REGISTER_FINI flag. * libc/stdlib/__call_atexit.c: Add test for _WANT_REGISTER_FINI to enable the register_fini function. --- newlib/libc/stdlib/__call_atexit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'newlib/libc/stdlib') diff --git a/newlib/libc/stdlib/__call_atexit.c b/newlib/libc/stdlib/__call_atexit.c index c99b2744e..4c4506343 100644 --- a/newlib/libc/stdlib/__call_atexit.c +++ b/newlib/libc/stdlib/__call_atexit.c @@ -15,6 +15,8 @@ void free(void *) _ATTRIBUTE((__weak__)); extern _LOCK_RECURSIVE_T __atexit_lock; #endif +#ifdef _WANT_REGISTER_FINI + /* If "__libc_fini" is defined, finalizers (either "__libc_fini_array", or "_fini", as appropriate) will be run after all user-specified atexit handlers. For example, you can define @@ -51,6 +53,8 @@ register_fini(void) } } +#endif /* _WANT_REGISTER_FINI */ + /* * Call registered exit handlers. If D is null then all handlers are called, * otherwise only the handlers from that DSO are called. -- cgit v1.2.3