From d5534dc11d834a374a11ba1e80790434d433a56f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Sun, 24 Jul 2011 14:37:28 +0000 Subject: [PATCH] [MSVCRTEX] - I say let msvcrt handle atexit registered functions. Fix msvc build svn path=/trunk/; revision=52836 --- reactos/lib/sdk/crt/startup/crtdll.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/reactos/lib/sdk/crt/startup/crtdll.c b/reactos/lib/sdk/crt/startup/crtdll.c index 6fa17a821f8..40557d9b5a2 100644 --- a/reactos/lib/sdk/crt/startup/crtdll.c +++ b/reactos/lib/sdk/crt/startup/crtdll.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,7 +73,8 @@ pre_c_init (void) if (onexitbegin == NULL) return 1; *onexitbegin = (_PVFV) NULL; - return 0; + return 0;*/ + return 1; } WINBOOL WINAPI _CRT_INIT (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) @@ -135,7 +136,7 @@ WINBOOL WINAPI _CRT_INIT (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) _amsg_exit (31); } else - { + {/* _PVFV * onexitbegin = (_PVFV *) _decode_pointer (__onexitbegin); if (onexitbegin) { @@ -145,7 +146,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); }