Imported Upstream version 2.6.0
This commit is contained in:
parent
26fb71b504
commit
459aaf9392
510 changed files with 40508 additions and 18859 deletions
22
common/atexit.c
Normal file
22
common/atexit.c
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* atexit() Mark Powell <medp@primagraphics.co.uk> */
|
||||
/* Implemented in terms of on_exit() for old BSD-style systems, like SunOS4 */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_ATEXIT
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
int atexit(fn)
|
||||
void (*fn)();
|
||||
{
|
||||
#ifdef HAVE_ON_EXIT
|
||||
return on_exit(fn, 0);
|
||||
#else
|
||||
/* Choose some errno thats likely to exist on lots of systems */
|
||||
errno = EPERM;
|
||||
return (-1);
|
||||
#endif /* HAVE_ON_EXIT */
|
||||
}
|
||||
|
||||
#endif /* HAVE_ATEXIT */
|
||||
Loading…
Add table
Add a link
Reference in a new issue