Hello, thanks for looking at this. For me it looks good. Just one note.

I would propose to not export that __mingw_mbrtowc_cp function from
public mingw-w64-headers headers at least for now, and rather have it in
some private mingw-w64-crt header only for mingw-w64 CRT code.

As we are still improving the mb* functions it is quite better to not
make that function visible for regular application until the API is
stable, which can prevent API breakage in case we would need to modify
this code again.

On Saturday 04 October 2025 12:47:33 Kirill Makurin wrote:
> This internal function is used to implement C95 functions mbrlen, mbrtowc and 
> mbsrtowcs. This makes difference for crtdll.dll, where `___lc_codepage_func` 
> parses return value of setlocale(LC_ALL, NULL) and converts code page part to 
> an `int`. With this change `mbsrtowcs` only needs to call both 
> `___lc_codepage_func` and `___mb_cur_max_func` once.
> 
> I wasn't sure where to declare __mingw_mbrtowc_cp; I don't feel like creating 
> internal header file just for one function, so I declared it in wchar.h.
> 
> If we're good with these patches, I'll send similar patches for `wcrtomb` and 
> `wcsrtombs`.
> 
> I just pushed them to my GitHub fork to run CI tests[1].
> 
> - Kirill Makurin
> 
> [1] https://github.com/maiddaisuki/mingw-w64/actions/runs/18244326038


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to