~ubuntu-branches/ubuntu/utopic/binutils-arm64-cross/utopic

« back to all changes in this revision

Viewing changes to binutils-2.23.52.20130611/libiberty/atexit.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-20 17:38:09 UTC
  • Revision ID: package-import@ubuntu.com-20130620173809-app8lzgvymy5fg6c
Tags: 0.7
Build-depend on binutils-source (>= 2.23.52.20130620-1~).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
 
2
/* This function is in the public domain.  --Mike Stump. */
 
3
 
 
4
/*
 
5
 
 
6
@deftypefn Supplemental int atexit (void (*@var{f})())
 
7
 
 
8
Causes function @var{f} to be called at exit.  Returns 0.
 
9
 
 
10
@end deftypefn
 
11
 
 
12
*/
 
13
 
 
14
#include "config.h"
 
15
 
 
16
#ifdef HAVE_ON_EXIT
 
17
 
 
18
int
 
19
atexit(void (*f)(void))
 
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
}
 
26
 
 
27
#endif