]> git.lyx.org Git - lyx.git/blob - src/support/atexit.c
Consistent use of preprocessor guards;
[lyx.git] / src / support / atexit.c
1 /**
2  * \file atexit.c
3  * Wrapper to implement ANSI C's atexit using SunOS's on_exit.
4  *
5  * This function is in the public domain.  --Mike Stump.
6  */
7
8 #include <config.h>
9
10 #ifndef NEED_on_exit
11 int atexit(void (*f)())
12 {
13   /* If the system doesn't provide a definition for atexit, use on_exit
14      if the system provides that.  */
15   on_exit (f, 0);
16   return 0;
17 }
18 #endif