https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108225

--- Comment #26 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> For --enable-threads=posix 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 need
> to include <gthr.h>, to find out if it's actually affected by _WIN32_WINNT.

OK, indeed I totally overlooked the other threading models...

> But IMHO we don't want to include <gthr.h> unconditionally in every single
> libstdc++ header (because they all include <bits/c++config.h> which includes
> 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.

Reply via email to