New file, from libiberty.
authorJim Meyering <jim@meyering.net>
Sat, 6 May 2000 14:33:22 +0000 (14:33 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 6 May 2000 14:33:22 +0000 (14:33 +0000)
lib/atexit.c [new file with mode: 0644]

diff --git a/lib/atexit.c b/lib/atexit.c
new file mode 100644 (file)
index 0000000..137d985
--- /dev/null
@@ -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