From 6507fa63cee634efb90511d5acbf21a6bf86e609 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 6 May 2000 14:33:22 +0000 Subject: New file, from libiberty. --- lib/atexit.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/atexit.c (limited to 'lib/atexit.c') diff --git a/lib/atexit.c b/lib/atexit.c new file mode 100644 index 000000000..137d985e4 --- /dev/null +++ b/lib/atexit.c @@ -0,0 +1,18 @@ +/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */ +/* This function is in the public domain. --Mike Stump. */ + +#include "config.h" + +#ifdef HAVE_ON_EXIT + +int +atexit(f) + void (*f)(); +{ + /* If the system doesn't provide a definition for atexit, use on_exit + if the system provides that. */ + on_exit (f, 0); + return 0; +} + +#endif -- cgit v1.2.3-54-g00ecf