| 1 | /** |
| 2 | * This file has no copyright assigned and is placed in the Public Domain. |
| 3 | * This file is part of the mingw-w64 runtime package. |
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| 5 | */ |
| 6 | |
| 7 | #include <stdlib.h> |
| 8 | |
| 9 | _onexit_t __cdecl _onexit(_onexit_t func) |
| 10 | { |
| 11 | return atexit((void (__cdecl *)(void))func) == 0 ? func : NULL; |
| 12 | } |
| 13 | _onexit_t __cdecl (*__MINGW_IMP_SYMBOL(_onexit))(_onexit_t func) = _onexit; |
| 14 | |
| 15 | _onexit_t __attribute__ ((alias ("_onexit"))) __cdecl onexit(_onexit_t); |
| 16 | extern _onexit_t (__cdecl * __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(_onexit))))) __MINGW_IMP_SYMBOL(onexit))(_onexit_t); |