[patch] Implement __cxa_atexit

Christopher Faylor me@cgf.cx
Wed Sep 15 10:44:00 GMT 2004

On Tue, Sep 14, 2004 at 07:24:33PM -0400, Christopher Faylor wrote:
>On Tue, Sep 14, 2004 at 02:46:57PM -0400, jjohnstn wrote:
>>Apparently there is some hidden dependency in Cygwin on the _reent struct 
>>as old applications are no longer working with this change.  This is 
>>unfortunate.  Until someone from Cygwin can determine what the problem is 
>>I have chosen to freeze sys/reent.h for Cygwin by putting it in the 
>>libc/sys/cygwin/sys directory.  The new changes have been modified to look 
>>for a new flag __REENT_HAS_CXA_SUPPORT to enable the new cxa support.  The 
>>default libc/include/sys/reent.h has the flag turned on.
>We were actually relying on behavior between two different versions of a
>compiler being unchanged.
>This is the minimal way to fix this.  I suppose it really should be
>#ifdef __CYGWIN__ though.
>I can fix this in another way in cygwin but this seemed cleaner and
>more straightforward.
>This patch is against the previous version of reent.h prior to any
>conditionalization.  With this change cygwin seems to be ok.

Nevermind.  I fixed this in cygwin, so there is no need to modify

You can, however, revert the cygwin-specific changes that you made.


More information about the Newlib mailing list