mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-23 09:54:39 +08:00
crt: Provide onexit symbol alias
Now when there is working _onexit() function, provide also onexit() aliased function, which already has declaration in stdlib.h header file. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
23414487df
commit
d2491a9358
@ -115,7 +115,7 @@ ADD_UNDERSCORE(memccpy)
|
||||
ADD_UNDERSCORE(memicmp)
|
||||
ADD_UNDERSCORE(mkdir)
|
||||
ADD_UNDERSCORE(mktemp)
|
||||
; ADD_UNDERSCORE(onexit)
|
||||
; onexit function alias is provided by misc/_onexit.c
|
||||
ADD_UNDERSCORE(open)
|
||||
#ifndef CRTAPP
|
||||
ADD_UNDERSCORE(putch)
|
||||
|
@ -11,3 +11,6 @@ _onexit_t __cdecl _onexit(_onexit_t func)
|
||||
return atexit((void (__cdecl *)(void))func) == 0 ? func : NULL;
|
||||
}
|
||||
_onexit_t __cdecl (*__MINGW_IMP_SYMBOL(_onexit))(_onexit_t func) = _onexit;
|
||||
|
||||
_onexit_t __attribute__ ((alias ("_onexit"))) __cdecl onexit(_onexit_t);
|
||||
extern _onexit_t (__cdecl * __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(_onexit))))) __MINGW_IMP_SYMBOL(onexit))(_onexit_t);
|
||||
|
Loading…
Reference in New Issue
Block a user