mirror of
https://github.com/curl/curl.git
synced 2026-07-16 08:07:17 +03:00
WIN32 fix, _beginthreadex() may return either 0 or -1L upon failure
This commit is contained in:
parent
4ee4e66c4f
commit
6ebd71d186
1 changed files with 5 additions and 1 deletions
|
|
@ -101,7 +101,11 @@ curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void*), void
|
|||
#ifdef _WIN32_WCE
|
||||
return CreateThread(NULL, 0, func, arg, 0, NULL);
|
||||
#else
|
||||
return (curl_thread_t)_beginthreadex(NULL, 0, func, arg, 0, NULL);
|
||||
curl_thread_t t;
|
||||
t = (curl_thread_t)_beginthreadex(NULL, 0, func, arg, 0, NULL);
|
||||
if((t == 0) || (t == (curl_thread_t)-1L))
|
||||
return curl_thread_t_null;
|
||||
return t;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue