Author: dgorbachev Date: Tue Jul 26 01:16:32 2011 New Revision: 52886
URL: http://svn.reactos.org/svn/reactos?rev=52886&view=rev Log: [MINGW-W64] Reduce differences with upstream. Fixes crash if ReactOS is compiled with GCC 4.6.
Modified: trunk/reactos/lib/3rdparty/mingw/tlssup.c
Modified: trunk/reactos/lib/3rdparty/mingw/tlssup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/tlssup.c... ============================================================================== --- trunk/reactos/lib/3rdparty/mingw/tlssup.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/tlssup.c [iso-8859-1] Tue Jul 26 01:16:32 2011 @@ -99,6 +99,7 @@ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved) { _PVFV *pfunc; + uintptr_t ps;
#ifndef _WIN64 if (_winmajor < 4) @@ -135,8 +136,11 @@ 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)(); }