* libgcc2.c (L_exit): Provide a fake for atexit on systems which
define ON_EXIT but not HAVE_ATEXIT.
From-SVN: r20982
+Tue Jul 7 00:50:17 1998 Manfred Hollstein (manfred@s-direktnet.de)
+
+ * libgcc2.c (L_exit): Provide a fake for atexit on systems which
+ define ON_EXIT but not HAVE_ATEXIT.
+
Tue Jul 7 00:44:35 1998 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* m68k.md (zero_extend QI to HI): Correctly handle TARGET_5200.
_exit (status);
}
-#else
+#else /* ON_EXIT defined */
int _exit_dummy_decl = 0; /* prevent compiler & linker warnings */
-#endif
+
+# ifndef HAVE_ATEXIT
+/* Provide a fake for atexit() using ON_EXIT. */
+int atexit (func_ptr func)
+{
+ return ON_EXIT (func, NULL);
+}
+# endif /* HAVE_ATEXIT */
+#endif /* ON_EXIT defined */
#endif /* L_exit */
\f