atexit.c revision 60484
133965Sjdp/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
233965Sjdp/* This function is in the public domain.  --Mike Stump. */
333965Sjdp
460484Sobrien#include "config.h"
560484Sobrien
660484Sobrien#ifdef HAVE_ON_EXIT
760484Sobrien
833965Sjdpint
933965Sjdpatexit(f)
1033965Sjdp     void (*f)();
1133965Sjdp{
1233965Sjdp  /* If the system doesn't provide a definition for atexit, use on_exit
1333965Sjdp     if the system provides that.  */
1433965Sjdp  on_exit (f, 0);
1533965Sjdp  return 0;
1633965Sjdp}
1760484Sobrien
1833965Sjdp#endif
19