]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_threads: delete WinCE fallback branch
authorViktor Szakats <commit@vsz.me>
Fri, 10 Oct 2025 22:11:16 +0000 (00:11 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 10 Oct 2025 23:04:24 +0000 (01:04 +0200)
Both WinCE and Windows use `CreateThread()` now, so the use of
`GetLastError()` works for both.

Follow-up to 03448f477a0cfa3868dfd15a7b9278dcecf944a2 #18998
Follow-up to 1c49f2f26d0f200bb9de61f795f06a1bc56845e9 #18451
Follow-up to af0216251b94e751baa47146ac9609db70793b8e #1589

Closes #19015

lib/curl_threads.c

index 352e002a3ddd2710c82083d06191d592fb6e70f5..68bfddddcbcdf196617b4c3b426b5e5b0231ff6f 100644 (file)
@@ -107,16 +107,12 @@ curl_thread_t Curl_thread_create(CURL_THREAD_RETURN_T
 {
   curl_thread_t t = CreateThread(NULL, 0, func, arg, 0, NULL);
   if(!t) {
-#ifndef UNDER_CE
     DWORD gle = GetLastError();
     /* !checksrc! disable ERRNOVAR 1 */
     int err = (gle == ERROR_ACCESS_DENIED ||
                gle == ERROR_NOT_ENOUGH_MEMORY) ?
                EACCES : EINVAL;
     CURL_SETERRNO(err);
-#else
-    CURL_SETERRNO(31); /* Windows ERROR_GEN_FAILURE */
-#endif
     return curl_thread_t_null;
   }
   return t;