Hi,
This simple code change the last error which sometimes is not allowed:
> #include <pthread.h>
> int main() {
> SetLastError(33);
> pthread_getspecific(0);
> return GetLastError();
> }
>
> $ gcc test.c -otest
> $ ./test; echo $?
> $ 0
Tell me please, have anyone faced with this problem? Maybe in the
mailing list there is a subject about this?
The question is whether will be correct the changing of
winpthreads-api this way?:
> void* pthread_getspecific(pthread_key_t key) {
> DWORD _last_error=GetLastError();
> ...
> ...some code...
> ...
> SetLastError(_last_error);
> }
Indeed, logically, the implementation of winpthreads should not have
no effect on GetLastError/SetLastError?
Thanks!
--
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