1*946379e7Schristos /* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */ 2*946379e7Schristos /* This function is in the public domain. --Mike Stump. */ 3*946379e7Schristos 4*946379e7Schristos #include <config.h> 5*946379e7Schristos 6*946379e7Schristos int atexit(void (* f)(void))7*946379e7Schristosatexit (void (*f) (void)) 8*946379e7Schristos { 9*946379e7Schristos /* If the system doesn't provide a definition for atexit, use on_exit 10*946379e7Schristos if the system provides that. */ 11*946379e7Schristos on_exit (f, 0); 12*946379e7Schristos return 0; 13*946379e7Schristos } 14