diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2015-04-22 10:25:34 +0200 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2015-04-22 10:25:34 +0200 |
commit | 7b1fa5a0c5daf3831b9857c8fa678aaa6679d618 (patch) | |
tree | fd89ac2d30f1dcf60c769ec994177e1ae09fa3fa /lib/curl_threads.c | |
parent | a8501fab9f2f579a6951c1cfcbc8f60b3d39af7f (diff) |
Imported Upstream version 7.42.0
Diffstat (limited to 'lib/curl_threads.c')
-rw-r--r-- | lib/curl_threads.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/curl_threads.c b/lib/curl_threads.c index d40e024c..f9b812ea 100644 --- a/lib/curl_threads.c +++ b/lib/curl_threads.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -33,10 +33,6 @@ #endif #include "curl_threads.h" - -#define _MPRINTF_REPLACE /* use our functions only */ -#include <curl/mprintf.h> - #include "curl_memory.h" /* The last #include file should be: */ #include "memdebug.h" @@ -77,8 +73,8 @@ curl_thread_t Curl_thread_create(unsigned int (*func) (void*), void *arg) return t; err: - Curl_safefree(t); - Curl_safefree(ac); + free(t); + free(ac); return curl_thread_t_null; } @@ -123,7 +119,12 @@ void Curl_thread_destroy(curl_thread_t hnd) int Curl_thread_join(curl_thread_t *hnd) { +#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \ + (_WIN32_WINNT < _WIN32_WINNT_VISTA) int ret = (WaitForSingleObject(*hnd, INFINITE) == WAIT_OBJECT_0); +#else + int ret = (WaitForSingleObjectEx(*hnd, INFINITE, FALSE) == WAIT_OBJECT_0); +#endif Curl_thread_destroy(*hnd); |