[MINGW-W64]

Reduce differences with upstream. Fixes crash if ReactOS is compiled with GCC 4.6.

svn path=/trunk/; revision=52886
This commit is contained in:
Dmitry Gorbachev 2011-07-26 01:16:32 +00:00
parent 3c6161ed9e
commit 21b5c3a4ec

View file

@ -99,6 +99,7 @@ BOOL WINAPI
__dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
_PVFV *pfunc;
uintptr_t ps;
#ifndef _WIN64
if (_winmajor < 4)
@ -135,8 +136,11 @@ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
return TRUE;
}
for (pfunc = &__xd_a + 1; pfunc != &__xd_z; ++pfunc)
ps = (uintptr_t) &__xd_a;
ps += sizeof (uintptr_t);
for ( ; ps != (uintptr_t) &__xd_z; ps += sizeof (uintptr_t))
{
pfunc = (_PVFV *) ps;
if (*pfunc != NULL)
(*pfunc)();
}