home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March / PCWK3A99.iso / Linux / DDD331 / DDD-3_1_.000 / DDD-3_1_ / ddd-3.1.1 / libiberty / atexit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-11  |  331 b   |  15 lines

  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. #ifndef NEED_on_exit
  5. int
  6. atexit(f)
  7.      void (*f)();
  8. {
  9.   /* If the system doesn't provide a definition for atexit, use on_exit
  10.      if the system provides that.  */
  11.   on_exit (f, 0);
  12.   return 0;
  13. }
  14. #endif
  15.