2011-11-30 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
* tlssup.c (__dyn_tls_init): Reapply patch from 3105314. Thank you to Earnie for creating the patch file.
This commit is contained in:
parent
23d5544748
commit
a1690e62ab
|
@ -1,3 +1,9 @@
|
|||
2011-11-30 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
|
||||
|
||||
* tlssup.c (__dyn_tls_init): Reapply patch from 3105314.
|
||||
|
||||
Thank you to Earnie for creating the patch file.
|
||||
|
||||
2011-11-26 Keith Marshall <keithmarshall@users.sourceforge.net>
|
||||
|
||||
Clean up DIRENT errno handling; make it more POSIX conformant.
|
||||
|
|
|
@ -84,6 +84,7 @@ BOOL WINAPI
|
|||
__dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
|
||||
{
|
||||
_PVFV *pfunc;
|
||||
int nfuncs, ifunc;
|
||||
|
||||
/* We don't let us trick here. */
|
||||
if (_CRT_MT != 2)
|
||||
|
@ -96,8 +97,12 @@ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
for (pfunc = &__xd_a + 1; pfunc != &__xd_z; ++pfunc)
|
||||
/* Use the nfuncs variable to iterate the TLS functions instead of pfunc to
|
||||
avoid nasty compiler optimizations when comparing two global pointers. */
|
||||
nfuncs = &__xd_z - (&__xd_a + 1);
|
||||
for (ifunc=0; ifunc < nfuncs; ++ifunc)
|
||||
{
|
||||
pfunc = (&__xd_a + 1) + ifunc;
|
||||
if (*pfunc != NULL)
|
||||
(*pfunc)();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue