* dcrt0.cc (cygwin_exit): Remove (hopefully) extraneous call to dll_global_dtors. * dll_init.cc (dll_global_dtors): Run destructors in reverse dependency/load order. * dll_init.h (dll_list): Add dll_global_dtors as a friend.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at http://cygwin.com You might especially be interested in http://cygwin.com/faq/faq.programming.html#faq.programming.building-cygwin