From f9c956a1ff9f636a6a2cc201d1996231231a7c77 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 7 Aug 2014 16:25:06 +0000 Subject: * common.din (__cxa_finalize): Export. * dcrt0.cc (cygwin_atexit): Use d->handle with __cxa_atexit. * dll_init.cc (dll_list::detach): Use d->handle with __cxa_finalize. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Use 274 for __cxa_finalize as well. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/common.din | 1 + winsup/cygwin/dcrt0.cc | 4 ++-- winsup/cygwin/dll_init.cc | 4 ++-- winsup/cygwin/include/cygwin/version.h | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin') diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 00d94efcc..7f0e354e3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2014-08-07 Yaakov Selkowitz + + * common.din (__cxa_finalize): Export. + * dcrt0.cc (cygwin_atexit): Use d->handle with __cxa_atexit. + * dll_init.cc (dll_list::detach): Use d->handle with __cxa_finalize. + * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Use 274 for + __cxa_finalize as well. + 2014-08-04 Anthony Heading * include/sys/file.h: Add extern "C". diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din index 8a8f38e36..bf20fde7a 100644 --- a/winsup/cygwin/common.din +++ b/winsup/cygwin/common.din @@ -42,6 +42,7 @@ __assertfail NOSIGFE __b64_ntop NOSIGFE __b64_pton NOSIGFE __cxa_atexit SIGFE +__cxa_finalize SIGFE __dn_comp SIGFE __dn_expand SIGFE __dn_skipname SIGFE diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 6e75ccee4..58068efef 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -1,7 +1,7 @@ /* dcrt0.cc -- essentially the main() for the Cygwin dll Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc. + 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc. This file is part of Cygwin. @@ -1240,7 +1240,7 @@ cygwin_atexit (void (*fn) (void)) { int res; dll *d = dlls.find ((void *) _my_tls.retaddr ()); - res = d ? __cxa_atexit ((void (*) (void *)) fn, NULL, d) : atexit (fn); + res = d ? __cxa_atexit ((void (*) (void *)) fn, NULL, d->handle) : atexit (fn); return res; } diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc index 637f1cc8e..3fcb448b9 100644 --- a/winsup/cygwin/dll_init.cc +++ b/winsup/cygwin/dll_init.cc @@ -1,7 +1,7 @@ /* dll_init.cc Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, - 2009, 2010, 2011, 2012, 2013 Red Hat, Inc. + 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for @@ -401,7 +401,7 @@ dll_list::detach (void *retaddr) exception protect; /* Call finalize function if we are not already exiting */ if (!exit_state) - __cxa_finalize (d); + __cxa_finalize (d->handle); d->run_dtors (); d->prev->next = d->next; if (d->next) diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 8c2497bde..b7469aff4 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -449,7 +449,7 @@ details. */ 273: Introduce account mapping from Windows account DBs. Add CW_SETENT, CW_GETENT, CW_ENDENT, CW_GETNSSSEP, CW_GETPWSID, CW_GETGRSID, CW_CYGNAME_FROM_WINNAME. - 274: Export __cxa_atexit. + 274: Export __cxa_atexit and __cxa_finalize. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ -- cgit v1.2.3