The replacements for mb*towc* and wc*tomb* functions are currently used only for pre-msvcr80.dll (including all msvcrt.dll). The tests should be skipped by returning 77 when compiled for msvcr80.dll and later (including UCRT).
Is it possible that me checking `__MSVCRT_VERSION__ >= 0x0800` is incorrect? - Kirill Makurin ________________________________ From: Martin Storsjö <mar...@martin.st> Sent: Monday, July 14, 2025 5:53 AM To: Kirill Makurin <maiddais...@outlook.com> Cc: mingw-w64-public <mingw-w64-public@lists.sourceforge.net> Subject: Re: [Mingw-w64-public] New implementation for C95 conversion functions On Sat, 12 Jul 2025, Kirill Makurin wrote: > ``` > The new testcases don't build in UCRT mode - see > https://github.com/mstorsjo/mingw-w64/actions/runs/16238894867/job/45852642 > 223#step:5:4386 > ``` > > Right... I forgot that UCRT's mbstate_t is a structure when was writing the > tests initially. I noticed and fixed this issue in my project (from which I > based both implementation and tests), but forgot to mirror the fix in sent > patches. > > I attached a patch which should fix it. I am only unsure whether it is OK to > check for _UCRT, maybe checking __MSVCRT_VERSION__ would be better? Thanks for the patch! Yes, _UCRT is generally the define we check for such things. With these changes in place, the tests do compile now, but they're still failing in UCRT build configurations, https://github.com/mstorsjo/mingw-w64/actions/runs/16253243924/job/45885823991: FAIL: testcases/t_mbsrtowcs =========================== Assertion failed: buffer[0] != WEOF && buffer[1] != WEOF && buffer[2] == WEOF, file ../testcases/t_mbsrtowcs.c, line 374 FAIL testcases/t_mbsrtowcs.exe (exit status: 127) FAIL: testcases/t_wcsrtombs =========================== Assertion failed: buffer[0] == EOF, file ../testcases/t_wcsrtombs.c, line 349 FAIL testcases/t_wcsrtombs.exe (exit status: 127) // Martin _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public