Mail Archives: djgpp/1997/10/26/09:56:12
On Fri, 24 Oct 1997, Andrew Crabtree wrote:
> But what do you mean
> by 'lie to the configuration', DJs libc does have an atexit?
Yes, of course it does. But GCC 2.7.2.1 (that's the only GCC sources
I have) deliberately do NOT define HAVE_ATEXIT, because doing so would
cause libgcc use its own mechanism to call the global destructors,
which is incompatible with DJGPP. So the way this is implemented in
GCC 2.7.2.1, DJGPP must deliberately tell GCC we don't have `atexit'
in order to have our own destructor-calling mechanism.
I think that HAVE_ATEXIT should be only used to tell whether we have
or don't have the `atexit' function. If GCC needs the configuration
to tell it whether libgcc should or shouldn't call the destructors,
there should be a separate mechanism to say that, which doesn't
involve HAVE_ATEXIT, because an implementation can have `atexit' but
still not want to use the libgcc's destructor-calling machinery.
- Raw text -