From 1b7ad41e50ce327c3258d5a33e2cb86f2c855192 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 8 May 2013 23:13:51 +0000 Subject: 2013-05-07 Sebastian Huber * libc/include/sys/config.h (_REENT_GLOBAL_ATEXIT): Define for RTEMS. * libc/include/sys/reent.h (_reent): Use _REENT_GLOBAL_ATEXIT. (_global_atexit): Declare if _REENT_GLOBAL_ATEXIT is defined. * libc/reent/reent.c (_reclaim_reent): Remove atexit cleanup if _REENT_GLOBAL_ATEXIT is defined. (_wrapup_reent): Remove atexit handling if _REENT_GLOBAL_ATEXIT is defined. * libc/stdlib/__atexit.c (_global_atexit0): Define if _REENT_GLOBAL_ATEXIT is defined. * libc/stdlib/__call_atexit.c (_global_atexit): Define if _REENT_GLOBAL_ATEXIT is defined. --- newlib/libc/stdlib/__call_atexit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'newlib/libc/stdlib/__call_atexit.c') diff --git a/newlib/libc/stdlib/__call_atexit.c b/newlib/libc/stdlib/__call_atexit.c index 76d3f1223..1e6e71044 100644 --- a/newlib/libc/stdlib/__call_atexit.c +++ b/newlib/libc/stdlib/__call_atexit.c @@ -13,6 +13,10 @@ void free(void *) _ATTRIBUTE((__weak__)); __LOCK_INIT_RECURSIVE(, __atexit_lock); +#ifdef _REENT_GLOBAL_ATEXIT +struct _atexit *_global_atexit = _NULL; +#endif + #ifdef _WANT_REGISTER_FINI /* If "__libc_fini" is defined, finalizers (either -- cgit v1.2.3