From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C68E5385840C; Wed, 11 Jan 2023 14:45:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C68E5385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673448340; bh=cfu6aMEmDj6BTJe3O7JfnV7TtIxuHyj8p0YI79XQd9c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AU95O5zkV+HZ00VKzL+V7abdY8JZ2qKH5kzHJuWXnmSJ9k8m53JlK3VR9AnIjTONI afMkEz1OwngqD9CucDY5UknNa6Utq7WkA2PUjFkVVCvYgzlIwoCu1Wd4PjWm1S/dU9 MOQsxd7wac4fVm6QxHuRansjWTv8Y7wKsN00zepw= From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108225] canadian compilation of gdb error for libstdc++'s std_mutex.h on x86_64-w64-mingw32 host Date: Wed, 11 Jan 2023 14:45:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108225 --- Comment #26 from Eric Botcazou --- > For --enable-threads=3Dposix the value of _WIN32_WINNT doesn't matter, so= we > don't want to disable _GLIBCXX_HAS_GTHREADS in that case. That's why we n= eed > to include , to find out if it's actually affected by _WIN32_WINN= T. OK, indeed I totally overlooked the other threading models... > But IMHO we don't want to include unconditionally in every single > libstdc++ header (because they all include which inclu= des > this os_defines.h header). So only do it if _WIN32_WINNT has been set to > some ancient value, because otherwise the problem doesn't exist. Fair enough, although it only drags stdlib.h and sys/timeb.h if you define __GTHREAD_HIDE_WIN32API like libstdc++ does.=