diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-09-14 18:12:53 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-09-14 18:12:53 +0000 |
commit | 98650d2fa2d2443ede83cc9f5d21d39e8078e60b (patch) | |
tree | 5497495f0c9328eb65766296b5589b08984afa37 /newlib/libc/stdlib/__atexit.c | |
parent | 272871abe46d6c6e7329f20fb8665cc08910f9a9 (diff) | |
download | cygnal-98650d2fa2d2443ede83cc9f5d21d39e8078e60b.tar.gz cygnal-98650d2fa2d2443ede83cc9f5d21d39e8078e60b.tar.bz2 cygnal-98650d2fa2d2443ede83cc9f5d21d39e8078e60b.zip |
2004-09-14 Jeff Johnston <jjohnstn@redhat.com>
* 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.
Diffstat (limited to 'newlib/libc/stdlib/__atexit.c')
-rw-r--r-- | newlib/libc/stdlib/__atexit.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/newlib/libc/stdlib/__atexit.c b/newlib/libc/stdlib/__atexit.c index 0c843ade6..310b69174 100644 --- a/newlib/libc/stdlib/__atexit.c +++ b/newlib/libc/stdlib/__atexit.c @@ -8,6 +8,7 @@ #include <sys/lock.h> #include "atexit.h" + /* * Register a function to be performed at exit or on shared library unload. */ @@ -47,8 +48,10 @@ _DEFUN (__register_exitproc, _GLOBAL_REENT->_atexit = p; #ifndef _REENT_SMALL p->_on_exit_args._fntypes = 0; +#ifdef __REENT_HAS_CXA_SUPPORT p->_on_exit_args._is_cxa = 0; #endif +#endif } if (type != __et_atexit) @@ -67,16 +70,20 @@ _DEFUN (__register_exitproc, } args->_fntypes = 0; args->_is_cxa = 0; +#ifdef __REENT_HAS_CXA_SUPPORT p->_on_exit_args_ptr = args; +#endif } #else args = &p->_on_exit_args; #endif args->_fnargs[p->_ind] = arg; - args->_dso_handle[p->_ind] = d; args->_fntypes |= (1 << p->_ind); +#ifdef __REENT_HAS_CXA_SUPPORT + args->_dso_handle[p->_ind] = d; if (type == __et_cxa) args->_is_cxa |= (1 << p->_ind); +#endif } p->_fns[p->_ind++] = fn; #ifndef __SINGLE_THREAD__ |