Hi Pali, this patch series looks good to me. I suggest we use new __mingw_isleadbyte_cp in __mingw_mbrtowc_cp which currently uses isleadbyte. I think when I was looking through Microsoft header files, I noted that isleadbyte was guarded with WINAPI_FAMILY checks, so it may not be available to all types of apps (could you please check it if it is not too much trouble?).
- Kirill Makurin ________________________________ From: Pali Rohár <[email protected]> Sent: Wednesday, December 31, 2025 3:29 AM To: [email protected] <[email protected]> Subject: [Mingw-w64-public] [PATCH 0/3] Improve mingw _cp helper functions Changes were applied on top of the 8d02d610f707b5f6af74653c6ebb0cdfa4df9212 Pali Rohár (3): crt: Improve __mingw_filename_cp() to work on systems without AreFileApisANSI() function crt: Add helper function __mingw_isleadbyte_cp() crt: Replace IsDBCSLeadByteEx() usage by __mingw_isleadbyte_cp() mingw-w64-crt/Makefile.am | 1 + mingw-w64-crt/misc/__mingw_filename_cp.c | 17 ++++++++-- mingw-w64-crt/misc/__mingw_isleadbyte_cp.c | 36 +++++++++++++++++++++ mingw-w64-crt/misc/dirname.c | 4 +-- mingw-w64-crt/stdio/__mingw_fix_stat_path.c | 2 +- mingw-w64-crt/testcases/t_btowc.c | 2 +- mingw-w64-headers/crt/locale.h | 3 ++ 7 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 mingw-w64-crt/misc/__mingw_isleadbyte_cp.c -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
