>> Or maybe the mutex can be added to the MinGW-w64 headers?
>Hmm, I'm not sure - in one sense, mingw-w64 should just expose the
>platform as accurately as possible, while we do try to fix some of the
>sharper edges (from a portability point of view too)
Yes, that makes sense, and afterall the i
在 2022-06-23 21:38, Luca Bacci 写道:
#define __MSVCRT__ 1
Is that macro necessary in a UCRT-based toolchain?
If you have GCC source you may have a look at 'gcc/config/i386/mingw32.h',
where there is
builtin_define ("__MSVCRT__");
So it's defined unconditionally, no matter whether it is
On Thu, 23 Jun 2022, Luca Bacci wrote:
Thank you very much, Biswapriyo Nath and Martin Storsjö!
I ask because in GLib we have to work around a MSVCRT issue. Basically, the
_wspawn*e functions from the MSVCRT are not thread safe, see
https://gitlab.gnome.org/GNOME/glib/-/issues/2509 for more inf
Sorry, the condition should be #if defined(_UCRT) &&
!defined(GLIB_STATIC_COMPILATION)
Luca
Il giorno gio 23 giu 2022 alle ore 15:34 Luca Bacci
ha scritto:
> Thank you very much, Biswapriyo Nath and Martin Storsjö!
>
> I ask because in GLib we have to work around a MSVCRT issue. Basically,
> th
Thank you very much, Biswapriyo Nath and Martin Storsjö!
I ask because in GLib we have to work around a MSVCRT issue. Basically, the
_wspawn*e functions from the MSVCRT are not thread safe, see
https://gitlab.gnome.org/GNOME/glib/-/issues/2509 for more informations. As
such we have to add a mutex
On Wed, 22 Jun 2022, Luca Bacci wrote:
As per the title, say I compile a static library archive using
mingw-w64-ucrt, can I use that archive with mingw-w64-msvcrt? (or viceversa)
Indeed, as Biswapriyo said, in general, you can't mix.
In practice, mixing them does work in many cases (so if you
AFAIK, it is not suggested to mix msvcrt and ucrt libraries. With
mingw, programs are not "truely" linked statically with system crt.
The compiled binaries also depends on msvcrt.dll or ucrtbase.dll.
`_UCRT` can be used to distinguish those two crt. But that macro is
used in headers/crt, not by com