mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 03:33:40 +00:00
[CRT]
- get back atexit handling as it was before. (reverts 52838, 52829, 52828) Thanks to Kai and Timo for the explanation svn path=/trunk/; revision=52840
This commit is contained in:
parent
a96df8f6f2
commit
3989ede5bb
8 changed files with 17 additions and 18 deletions
|
@ -1156,7 +1156,7 @@
|
|||
@ cdecl asin(double)
|
||||
@ cdecl atan(double)
|
||||
@ cdecl atan2(double double)
|
||||
@ cdecl atexit(ptr)
|
||||
@ extern atexit # <-- keep this as an extern, thank you
|
||||
@ cdecl atof(str)
|
||||
@ cdecl atoi(str)
|
||||
@ cdecl atol(str)
|
||||
|
|
|
@ -937,7 +937,7 @@
|
|||
@ cdecl asin(double)
|
||||
@ cdecl atan(double)
|
||||
@ cdecl atan2(double double)
|
||||
@ cdecl atexit(ptr)
|
||||
@ extern atexit # <-- do not touch this!
|
||||
@ cdecl atof(str)
|
||||
@ cdecl atoi(str)
|
||||
@ cdecl atol(str)
|
||||
|
|
|
@ -975,7 +975,7 @@
|
|||
@ cdecl asin(double)
|
||||
@ cdecl atan(double)
|
||||
@ cdecl atan2(double double)
|
||||
@ cdecl atexit(ptr)
|
||||
@ extern atexit # <-- changing this will kill your cat, understand?
|
||||
@ cdecl atof(str)
|
||||
@ cdecl atoi(str)
|
||||
@ cdecl atol(str)
|
||||
|
|
6
reactos/lib/3rdparty/mingw/crtexe.c
vendored
6
reactos/lib/3rdparty/mingw/crtexe.c
vendored
|
@ -71,8 +71,8 @@ extern _CRTALLOC(".CRT$XCZ") _PVFV __xc_z[];
|
|||
/* TLS initialization hook. */
|
||||
extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback;
|
||||
|
||||
//extern _PVFV *__onexitbegin;
|
||||
//extern _PVFV *__onexitend;
|
||||
extern _PVFV *__onexitbegin;
|
||||
extern _PVFV *__onexitend;
|
||||
|
||||
extern int mingw_app_type;
|
||||
|
||||
|
@ -119,7 +119,7 @@ pre_c_init (void)
|
|||
__set_app_type(_GUI_APP);
|
||||
else
|
||||
__set_app_type (_CONSOLE_APP);
|
||||
// __onexitbegin = __onexitend = (_PVFV *) _encode_pointer ((_PVFV *)(-1));
|
||||
__onexitbegin = __onexitend = (_PVFV *) _encode_pointer ((_PVFV *)(-1));
|
||||
|
||||
* __MINGW_IMP_SYMBOL(_fmode) = _fmode;
|
||||
* __MINGW_IMP_SYMBOL(_commode) = _commode;
|
||||
|
|
2
reactos/lib/3rdparty/mingw/mingw.rbuild
vendored
2
reactos/lib/3rdparty/mingw/mingw.rbuild
vendored
|
@ -12,7 +12,7 @@
|
|||
<include base="ReactOS">include/reactos/mingw-w64</include>
|
||||
<library>kernel32</library>
|
||||
<file>_newmode.c</file>
|
||||
<!--file>atonexit.c</file-->
|
||||
<file>atonexit.c</file>
|
||||
<file>binmode.c</file>
|
||||
<file>charmax.c</file>
|
||||
<file>cinitexe.c</file>
|
||||
|
|
|
@ -17,7 +17,7 @@ list(APPEND MSVCRTEX_SOURCE
|
|||
startup/natstart.c
|
||||
startup/charmax.c
|
||||
startup/merr.c
|
||||
# startup/atonexit.c
|
||||
startup/atonexit.c
|
||||
startup/txtmode.c
|
||||
startup/pesect.c
|
||||
startup/tlsmcrt.c
|
||||
|
|
|
@ -49,8 +49,8 @@ extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback;
|
|||
|
||||
static int __proc_attached = 0;
|
||||
|
||||
//extern _PVFV *__onexitbegin;
|
||||
//extern _PVFV *__onexitend;
|
||||
extern _PVFV *__onexitbegin;
|
||||
extern _PVFV *__onexitend;
|
||||
|
||||
extern int mingw_app_type;
|
||||
|
||||
|
@ -65,7 +65,7 @@ _CRTALLOC(".CRT$XIAA") _PIFV pcinit = pre_c_init;
|
|||
static int
|
||||
pre_c_init (void)
|
||||
{
|
||||
/* _PVFV *onexitbegin;
|
||||
_PVFV *onexitbegin;
|
||||
|
||||
onexitbegin = (_PVFV *) malloc (32 * sizeof (_PVFV));
|
||||
__onexitend = __onexitbegin = (_PVFV *) _encode_pointer (onexitbegin);
|
||||
|
@ -73,8 +73,7 @@ pre_c_init (void)
|
|||
if (onexitbegin == NULL)
|
||||
return 1;
|
||||
*onexitbegin = (_PVFV) NULL;
|
||||
return 0;*/
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
WINBOOL WINAPI _CRT_INIT (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
|
||||
|
@ -136,7 +135,7 @@ WINBOOL WINAPI _CRT_INIT (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
|
|||
_amsg_exit (31);
|
||||
}
|
||||
else
|
||||
{/*
|
||||
{
|
||||
_PVFV * onexitbegin = (_PVFV *) _decode_pointer (__onexitbegin);
|
||||
if (onexitbegin)
|
||||
{
|
||||
|
@ -146,7 +145,7 @@ WINBOOL WINAPI _CRT_INIT (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
|
|||
(**onexitend) ();
|
||||
free (onexitbegin);
|
||||
__onexitbegin = __onexitend = (_PVFV *) NULL;
|
||||
}*/
|
||||
}
|
||||
__native_startup_state = __uninitialized;
|
||||
(void) InterlockedExchangePointer ((volatile PVOID *) &__native_startup_lock, 0);
|
||||
}
|
||||
|
|
|
@ -75,8 +75,8 @@ extern _CRTALLOC(".CRT$XCZ") _PVFV __xc_z[];
|
|||
/* TLS initialization hook. */
|
||||
extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback;
|
||||
|
||||
//extern _PVFV *__onexitbegin;
|
||||
//extern _PVFV *__onexitend;
|
||||
extern _PVFV *__onexitbegin;
|
||||
extern _PVFV *__onexitend;
|
||||
|
||||
extern int mingw_app_type;
|
||||
|
||||
|
@ -128,7 +128,7 @@ pre_c_init (void)
|
|||
__set_app_type(_GUI_APP);
|
||||
else
|
||||
__set_app_type (_CONSOLE_APP);
|
||||
// __onexitbegin = __onexitend = (_PVFV *) _encode_pointer ((_PVFV *)(-1));
|
||||
__onexitbegin = __onexitend = (_PVFV *) _encode_pointer ((_PVFV *)(-1));
|
||||
|
||||
* __MINGW_IMP_SYMBOL(_fmode) = _fmode;
|
||||
* __MINGW_IMP_SYMBOL(_commode) = _commode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue