2012/5/5 niXman <[email protected]>:
> 2012/5/5 Kai Tietz:
>> Could somebody do tests if the LastError state can be really changed?
>
> About what tests there is a speech?
I suppose that not only pthread_getspecific() changes last_error.
As I already spoke earlier, winpthreads-api shan't change last_error
value because in documentation isn't present words about WINAPI
implementation.
Therefore, users of Windows won't known about it.
One more example:
#include <windows.h>
struct C { ~C() {} };
int Test() {
int errval = ::GetLastError(); // errval == 0 !!!
C t;
return errval;
}
int main(int, const char**) {
::SetLastError(2);
return Test(); // 0
}
Sequentially calls is as follows:
main() -> Test() -> _Unwind_SjLj_Register() -> pthread_getspecific()
-> TlsGetValue()
--
Regards,
niXman
------------------------------------------------------------------------------
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