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