2002-09-17 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_key::set): Preserve GetLastError(). Reported by Thomas Pffaf.
This commit is contained in:
@ -1101,8 +1101,10 @@ pthread_key::set (const void *value)
|
||||
void *
|
||||
pthread_key::get ()
|
||||
{
|
||||
set_errno (0);
|
||||
return TlsGetValue (dwTlsIndex);
|
||||
int savedError = ::GetLastError();
|
||||
void *result = TlsGetValue (dwTlsIndex);
|
||||
::SetLastError (savedError);
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user