diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 513c34d32..14369fa17 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2003-09-05 Jeff Johnston + + * libc/stdlib/exit.c (exit): Setting of struct _atexit ptr p + is different for _REENT_SMALL than when using regular reent + struct. + 2003-09-05 Ben Elliston * libc/ctype/wctype.c (_DEFUN): Remove empty default case, as diff --git a/newlib/libc/stdlib/exit.c b/newlib/libc/stdlib/exit.c index 286c20db9..dad2861d2 100644 --- a/newlib/libc/stdlib/exit.c +++ b/newlib/libc/stdlib/exit.c @@ -64,9 +64,8 @@ _DEFUN (exit, (code), register int n; int i; - p = &_GLOBAL_REENT->_atexit; - #ifdef _REENT_SMALL + p = &_GLOBAL_REENT->_atexit; args = p->_on_exit_args_ptr; if (args == NULL) @@ -83,6 +82,7 @@ _DEFUN (exit, (code), p->_fns[n] (); } #else + p = _GLOBAL_REENT->_atexit; do { args = & p->_on_exit_args;