Re: [Mingw-w64-public] Different behaviour between msvcrt and ucrt compilers wrt -D__USE_MINGW_ANSI_STDIO

2024-11-11 Thread LIU Hao
在 2024-11-12 11:55, sisyphus 写道: If I want to configure the gmp library to be built with HAVE_VSNPRINTF defined, and I'm using a UCRT compiler package, then I need to configure with the -D__USE_MINGW_ANSI_STDIO flag. (Otherwise the gmp configure step decides that vsnprintf does not work, and an m

[Mingw-w64-public] Different behaviour between msvcrt and ucrt compilers wrt -D__USE_MINGW_ANSI_STDIO

2024-11-11 Thread sisyphus
If I want to configure the gmp library to be built with HAVE_VSNPRINTF defined, and I'm using a UCRT compiler package, then I need to configure with the -D__USE_MINGW_ANSI_STDIO flag. (Otherwise the gmp configure step decides that vsnprintf does not work, and an mpfr library built against the resul

Re: [Mingw-w64-public] getmainargs changes

2024-11-11 Thread LIU Hao
在 2024-11-12 06:34, Martin Storsjö 写道: FYI, see https://github.com/msys2/MINGW-packages/issues/22462 where someone ran into issues caused by this. Also see https://ffmpeg.org/pipermail/ffmpeg-devel/2024-November/335936.html where someone else observes other issues related to this. (The descrip

Re: [Mingw-w64-public] getmainargs changes

2024-11-11 Thread Pali Rohár
On Monday 11 November 2024 22:10:01 Lasse Collin wrote: > On 2024-11-11 Pali Rohár wrote: > > If application do not want to fail then double quote in _acmdln must > > not come from other (non double quote) character. Otherwise argv[] > > would be wrongly constructed. And I think that argv[] splitti

Re: [Mingw-w64-public] getmainargs changes

2024-11-11 Thread Martin Storsjö
On Mon, 11 Nov 2024, Lasse Collin wrote: On 2024-11-11 Pali Rohár wrote: If application do not want to fail then double quote in _acmdln must not come from other (non double quote) character. Otherwise argv[] would be wrongly constructed. And I think that argv[] splitting must be done correctly

Re: [Mingw-w64-public] getmainargs changes

2024-11-11 Thread Pali Rohár
Hello, now I have figured out that the problem described here is still present in mingw-w64 repository even with the fix from commit: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0d42217123d3aec0341b79f6d959c76e09648a1e/ The problem is in the file mingw-w64-crt/crt/crtexewin.c which directly

Re: [Mingw-w64-public] getmainargs changes

2024-11-11 Thread Lasse Collin
On 2024-11-11 Pali Rohár wrote: > If application do not want to fail then double quote in _acmdln must > not come from other (non double quote) character. Otherwise argv[] > would be wrongly constructed. And I think that argv[] splitting must > be done correctly. I agree it makes sense to do split

Re: [Mingw-w64-public] getmainargs changes

2024-11-11 Thread Pali Rohár
On Sunday 10 November 2024 20:56:05 Lasse Collin wrote: > On 2024-11-10 Pali Rohár wrote: > > On Sunday 10 November 2024 00:14:42 Pali Rohár wrote: > > > > On 2024-11-09 LIU Hao wrote: > > > > > I have a crazy idea now. Does it make sense to overwrite > > > > > `_acmdln` (for MSVCRT) or `*__p__ac

Re: [Mingw-w64-public] getmainargs changes

2024-11-11 Thread LIU Hao
在 2024-11-11 02:56, Lasse Collin 写道: If conversion cannot be done in a lossless way, it depends on the application what is a safe fallback, or if there are any useful fallbacks at all. Maybe I'm missing something but I don't see a useful generic method to overwrite _acmdln. In a previous messag

[Mingw-w64-public] [PATCH 1/2] headers/_mingw: Add macros for conditional `constexpr`

2024-11-11 Thread LIU Hao
-- Best regards, LIU Hao From 0ab21a6aef1a82e87ee31d88b1f8d5feba88a6d7 Mon Sep 17 00:00:00 2001 From: LIU Hao Date: Mon, 11 Nov 2024 23:59:26 +0800 Subject: [PATCH 1/2] headers/_mingw: Add macros for conditional `constexpr` Signed-off-by: LIU Hao --- mingw-w64-headers/crt/_mingw.h.in | 14 +

[Mingw-w64-public] DEFINE_ENUM_FLAG_OPERATORS not allowing constexpr

2024-11-11 Thread Luca Bacci
Hello, it seems that it's not possible to use constexpr with some enums (mostly present in directx headers) For example: constexpr DWRITE_FONT_SIMULATIONS simulations = DWRITE_FONT_SIMULATIONS_BOLD | DWRITE_FONT_SIMULATIONS_OBLIQUE; That works in MSVC with the Windows SDK, while wi