This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: static constructors/destructors and atexit


Todd Vierling wrote:
> 
> On Mon, 10 Aug 1998, Steven Parkes wrote:
> 
> : so the idea is use gcc's atexit on systems that implement limited atexits?
> 
> I liked the earlier idea of a specialized atexit() for this purpose.  If,
> for example, a small version of atexit() designed for the job were put in
> libgcc2, who calls the real atexit() only once, you could use it on all
> systems (not just those with "broken atexit()s").  Something with a name
> like __dtoratexit() or similar.

Yes, since the spec states that an implementation could have a limit to
the number of called functions, I wrote my own.  The atexit__set()
function calls atexit() once and keeps track of the registered
function.  The only problem (which is not insurmountable) would be to
get everyone to use this new function.

Noel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]