1 /* $NetBSD: atexit.c,v 1.1.1.1 2016/01/10 21:36:18 christos Exp $ */ 2 3 /* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */ 4 /* This function is in the public domain. --Mike Stump. */ 5 6 #include "config.h" 7 8 int 9 atexit(f) 10 void (*f)(); 11 { 12 /* If the system doesn't provide a definition for atexit, use on_exit 13 if the system provides that. */ 14 on_exit (f, 0); 15 return 0; 16 } 17