On Sat, 12 Jul 2025, LIU Hao wrote:
在 2025-7-9 21:09, Kirill Makurin 写道:
Here's the updated patches. They passed all tests[1].
The reason was that when misc/btowc.c and misc/wctob.c were compiled
for UCRT, they were using msvcr*.dll's mbstate_t which has different
size. I added new misc/ucrt_btowc.c and misc/ucrt_wctob.c for UCRT
compilation.
I also discovered one case when wcrtomb would return incorrect value.
The fix is included.
I think this series of patches now look fine, so I pushed them. There
were some typos in the second one ('valie' => 'value') which I fixed.
Thanks for the work.
The new testcases don't build in UCRT mode - see
https://github.com/mstorsjo/mingw-w64/actions/runs/16238894867/job/45852642223#step:5:4386.
(We don't have them hooked up in CI in git master yet, as I'm not very
satisfied with the way of fixing building the testcases to not use the
same CFLAGS as the rest of mingw-w64-crt.)
Some of the errors seem to be:
../testcases/t_mbrlen.c:48:9: error: assigning to 'mbstate_t' (aka 'struct
_Mbstatet') from incompatible type 'char'
48 | state = Ascii[0];
| ^ ~~~~~~~~
../testcases/t_wcrtomb.c:45:9: error: assigning to 'mbstate_t' (aka
'struct _Mbstatet') from incompatible type 'int'
45 | state = 1;
| ^ ~
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public