diff options
author | thegeorg <[email protected]> | 2024-10-04 11:15:32 +0300 |
---|---|---|
committer | thegeorg <[email protected]> | 2024-10-04 11:29:39 +0300 |
commit | 37112f646e6da1c3eb50de15cbbb8793b383b27e (patch) | |
tree | f32d6652f26110a47441c8cf8a08216eca1a52b6 /contrib/libs/curl/lib/curl_threads.c | |
parent | 9a6b8cb5c502ba2b158c337ce13e983e3c3dc78f (diff) |
Update contrib/libs/curl to 8.10.1
commit_hash:428ef806a15515cdaa325530aa8cc6903fac5fb6
Diffstat (limited to 'contrib/libs/curl/lib/curl_threads.c')
-rw-r--r-- | contrib/libs/curl/lib/curl_threads.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/contrib/libs/curl/lib/curl_threads.c b/contrib/libs/curl/lib/curl_threads.c index 222d9364f03..6d73273f789 100644 --- a/contrib/libs/curl/lib/curl_threads.c +++ b/contrib/libs/curl/lib/curl_threads.c @@ -35,7 +35,9 @@ #endif #include "curl_threads.h" +#ifdef BUILDING_LIBCURL #include "curl_memory.h" +#endif /* The last #include file should be: */ #include "memdebug.h" @@ -100,18 +102,23 @@ int Curl_thread_join(curl_thread_t *hnd) #elif defined(USE_THREADS_WIN32) -/* !checksrc! disable SPACEBEFOREPAREN 1 */ -curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void *), +curl_thread_t Curl_thread_create( +#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP) + DWORD +#else + unsigned int +#endif + (CURL_STDCALL *func) (void *), void *arg) { -#ifdef _WIN32_WCE +#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP) typedef HANDLE curl_win_thread_handle_t; #else typedef uintptr_t curl_win_thread_handle_t; #endif curl_thread_t t; curl_win_thread_handle_t thread_handle; -#ifdef _WIN32_WCE +#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP) thread_handle = CreateThread(NULL, 0, func, arg, 0, NULL); #else thread_handle = _beginthreadex(NULL, 0, func, arg, 0, NULL); @@ -131,7 +138,8 @@ curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void *), void Curl_thread_destroy(curl_thread_t hnd) { - CloseHandle(hnd); + if(hnd != curl_thread_t_null) + CloseHandle(hnd); } int Curl_thread_join(curl_thread_t *hnd) |