From 98650d2fa2d2443ede83cc9f5d21d39e8078e60b Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 14 Sep 2004 18:12:53 +0000 Subject: 2004-09-14 Jeff Johnston * configure.host: Add Cygwin sys directory. * configure.in: Do not set CRT0 for cygwin. * libc/configure.in: Ditto. * libc/sys/configure.in: Ditto. * configure: Regenerated. * libc/configure: Ditto. * libc/sys/configure: Ditto. * libc/include/sys/reent.h: Add __REENT_HAS_CXA_SUPPORT flag. * libc/stdlib/__atexit.c: Keep cxa support protected by new __REENT_HAS_CXA_SUPPORT flag. * libc/stdlib/__call_atexit.c: Ditto. * libc/stdlib/cxa_atexit.c: Ditto. * libc/stdlib/cxa_finalize.c: Ditto. * libc/sys/cygwin/Makefile.am: New file. * libc/sys/cygwin/Makefile.in: Ditto. * libc/sys/cygwin/aclocal.m4: Ditto. * libc/sys/cygwin/configure: Ditto. * libc/sys/cygwin/configure.in: Ditto. * libc/sys/cygwin/dummy.c: Ditto. * libc/sys/cygwin/sys/reent.h: Ditto. This file is stabilized version of reent.h. --- 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 cea569ff4..8e91770c2 100644 --- a/newlib/libc/stdlib/__call_atexit.c +++ b/newlib/libc/stdlib/__call_atexit.c @@ -36,9 +36,11 @@ _DEFUN (__call_exitprocs, (code, d), { i = 1 << n; +#ifdef __REENT_HAS_CXA_SUPPORT /* Skip functions not from this dso. */ if (d && (!args || args->_dso_handle[n] != d)) continue; +#endif /* Remove the function now to protect against the function calling exit recursively. */ @@ -55,8 +57,10 @@ _DEFUN (__call_exitprocs, (code, d), /* Call the function. */ if (!args || (args->_fntypes & i) == 0) fn (); +#ifdef __REENT_HAS_CXA_SUPPORT else if ((args->_is_cxa & i) == 0) (*((void (*)(int, _PTR)) fn))(code, args->_fnargs[n]); +#endif else (*((void (*)(_PTR)) fn))(args->_fnargs[n]); } -- cgit v1.2.3