2012/7/18 Ozkan Sezer:
> Some very small C program showing the brokenness without
> the change, and showing the healthiness with the change applied.
> The existing tests in winpthreads are examples.
>
Test for patch for pthread_getspecific().
Without the patch, main() return -2.
#include <windows.h>
struct C { ~C() {} };
int Test() {
C t;
return ::GetLastError();
}
int main(int, const char**) {
::SetLastError(2);
return Test()-2;
}
Test for patch for pthread_setspecific().
Without the patch, main() return -2.
#include <windows.h>
struct S {
~S() {
SetLastError(2);
}
};
void foo() {
S();
}
int main() {
foo();
return GetLastError()-2;
}
--
Regards,
niXman
___________________________________________________
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public