head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.11.09.23.05.14; author js; state Exp; branches; next ; commitid iOUph1oNwRIEaQ2H; desc @@ 1.1 log @Add cross/mingw-w64-i686-*-crtdll This allows compiling for Win32s / Win95 without msvcrt. However, C++ requires the _w* functions that are only in msvcrt and newer *and* require Windows NT, so C++ is disabled for now. @ text @$NetBSD$ Don't use GetThreadId(), which does not exist before Vista. Since GCC already uses DuplicateHandle() and uses TLS to store the result, we can just compare pointers. --- libgcc/config/i386/gthr-win32-thread.c.orig 2026-11-09 22:27:29.993414402 +0000 +++ libgcc/config/i386/gthr-win32-thread.c @@@@ -116,7 +116,7 @@@@ __gthr_win32_join (__gthread_t thr, void { int status = 0; - if (GetThreadId ((HANDLE) thr) == GetCurrentThreadId ()) + if (thr == __gthr_win32_self ()) return 1; if (WaitForSingleObject ((HANDLE) thr, INFINITE) == WAIT_OBJECT_0) @