On Fri, 15 Aug 2025, Pali Rohár wrote:
Pali Rohár (9):
crt: Provide emulation of ___lc_handle_func for msvcrt.dll and
msvcrtd.dll
crt: Improve support for ___lc_codepage_func() function
crt: Remove internal mb_wc_common.h and replace it by locale.h usage
crt: Remove static helper function mbrtowc_cp()
crt: Move private state_mbrlen/state_mbrtowc/state_mbsrtowcs variables
to corresponding functions
crt: Replace IsDBCSLeadByteEx() by _ismbblead() in mbrtowc()
crt: Use errno instead of _set_errno in mbrtowc
crt: Split mbrtowc.c into 3 files mbrlen.c mbrtowc.c and mbsrtowcs.c
crt: Use only mbstate_t in mbsrtowcs
mingw-w64-crt/Makefile.am | 12 +-
mingw-w64-crt/lib-common/msvcrt.def.in | 2 +-
.../{mb_wc_common.h => ___lc_codepage_func.c} | 15 +-
...cale_func.c => ___lc_codepage_func_emul.c} | 64 ++-----
.../{mb_wc_common.h => ___lc_handle_func.c} | 17 +-
mingw-w64-crt/misc/btowc.c | 2 +-
.../misc/{mb_wc_common.h => mbrlen.c} | 17 +-
mingw-w64-crt/misc/mbrtowc.c | 147 ++-------------
mingw-w64-crt/misc/{mbrtowc.c => mbsrtowcs.c} | 174 +-----------------
mingw-w64-crt/misc/mingw_wcstold.c | 2 -
mingw-w64-crt/misc/wcrtomb.c | 2 +-
mingw-w64-crt/misc/wcstof.c | 2 -
mingw-w64-crt/misc/wctob.c | 2 +-
13 files changed, 95 insertions(+), 363 deletions(-)
copy mingw-w64-crt/misc/{mb_wc_common.h => ___lc_codepage_func.c} (41%)
rename mingw-w64-crt/misc/{lc_locale_func.c => ___lc_codepage_func_emul.c} (15%)
copy mingw-w64-crt/misc/{mb_wc_common.h => ___lc_handle_func.c} (39%)
rename mingw-w64-crt/misc/{mb_wc_common.h => mbrlen.c} (38%)
copy mingw-w64-crt/misc/{mbrtowc.c => mbsrtowcs.c} (30%)
These patches all look reasonable to me, but if Kirill's patches touch the
same, and you agreed on rebasing this on top of their changes once they
have landed, we'll wait for that.
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public