From 25f0d94be4e63b1a3cea1844bc4be7849c452a75 Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 6 Feb 2001 05:44:38 +0000 Subject: Created experimental branch. --- tsd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tsd.c') diff --git a/tsd.c b/tsd.c index 4e95210..63169c7 100644 --- a/tsd.c +++ b/tsd.c @@ -322,6 +322,12 @@ pthread_getspecific (pthread_key_t key) * ------------------------------------------------------ */ { - return (TlsGetValue (key->key)); + int lasterror = GetLastError(); + + void *ptr = TlsGetValue(key->key); + + SetLastError(lasterror); + + return (ptr); } -- cgit v1.2.3