]> git.ipfire.org Git - thirdparty/gcc.git/blame - libiberty/atexit.c
[Ada] Improved support for aspect alignment in CCG
[thirdparty/gcc.git] / libiberty / atexit.c
CommitLineData
6599da04
JM
1/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
2/* This function is in the public domain. --Mike Stump. */
3
aaa5f039
DD
4/*
5
6@deftypefn Supplemental int atexit (void (*@var{f})())
7
8Causes function @var{f} to be called at exit. Returns 0.
9
10@end deftypefn
11
12*/
13
3affd5f0
JL
14#include "config.h"
15
16#ifdef HAVE_ON_EXIT
17
6599da04 18int
9486db4f 19atexit(void (*f)(void))
6599da04
JM
20{
21 /* If the system doesn't provide a definition for atexit, use on_exit
22 if the system provides that. */
23 on_exit (f, 0);
24 return 0;
25}
3affd5f0 26
6599da04 27#endif