Symbols __iswcsymf and __iswcsym are available in msvcr80+ and UCRT. They are not available in msvcrt.dll. --- mingw-w64-crt/Makefile.am | 4 ++++ mingw-w64-crt/misc/__iswcsym.c | 19 +++++++++++++++++++ mingw-w64-crt/misc/__iswcsymf.c | 19 +++++++++++++++++++ mingw-w64-headers/crt/ctype.h | 4 ++-- mingw-w64-headers/crt/wchar.h | 4 ++-- mingw-w64-headers/crt/wctype.h | 2 -- 6 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 mingw-w64-crt/misc/__iswcsym.c create mode 100644 mingw-w64-crt/misc/__iswcsymf.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 98bd5a164e8d..12a1c8cfda91 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -320,6 +320,8 @@ src_msvcrt_add_vscanf=\ # Files included in libmsvcrt-os.a (for msvcrt.dll) on all archs src_msvcrt=\ $(src_msvcrt_add_vscanf) \ + misc/__iswcsym.c \ + misc/__iswcsymf.c \ misc/__sys_errlist.c \ misc/__sys_nerr.c \ misc/_configthreadlocale.c \ @@ -776,6 +778,8 @@ src_pre_msvcr71=\ misc/_set_purecall_handler.c src_pre_msvcr80=\ + misc/__iswcsym.c \ + misc/__iswcsymf.c \ misc/__sys_errlist.c \ misc/__sys_nerr.c \ misc/_configthreadlocale.c \ diff --git a/mingw-w64-crt/misc/__iswcsym.c b/mingw-w64-crt/misc/__iswcsym.c new file mode 100644 index 000000000000..74d9e7ffdf4a --- /dev/null +++ b/mingw-w64-crt/misc/__iswcsym.c @@ -0,0 +1,19 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include <_mingw.h> +#include <corecrt.h> + +#undef iswalnum +_CRTIMP int __cdecl iswalnum(wint_t c); + +#undef __iswcsym +int __cdecl __iswcsym(wint_t c); +int __cdecl __iswcsym(wint_t c) +{ + return iswalnum(c) || c == L'_'; +} +int (__cdecl *__MINGW_IMP_SYMBOL(__iswcsym))(wint_t) = __iswcsym; diff --git a/mingw-w64-crt/misc/__iswcsymf.c b/mingw-w64-crt/misc/__iswcsymf.c new file mode 100644 index 000000000000..18a234a0bed7 --- /dev/null +++ b/mingw-w64-crt/misc/__iswcsymf.c @@ -0,0 +1,19 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include <_mingw.h> +#include <corecrt.h> + +#undef iswalpha +_CRTIMP int __cdecl iswalpha(wint_t c); + +#undef __iswcsymf +int __cdecl __iswcsymf(wint_t c); +int __cdecl __iswcsymf(wint_t c) +{ + return iswalpha(c) || c == L'_'; +} +int (__cdecl *__MINGW_IMP_SYMBOL(__iswcsymf))(wint_t) = __iswcsymf; diff --git a/mingw-w64-headers/crt/ctype.h b/mingw-w64-headers/crt/ctype.h index 922dab67a6b3..08fc02b75823 100644 --- a/mingw-w64-headers/crt/ctype.h +++ b/mingw-w64-headers/crt/ctype.h @@ -138,6 +138,8 @@ int __cdecl isblank(int _C); _CRTIMP wint_t __cdecl towupper(wint_t _C); _CRTIMP wint_t __cdecl towlower(wint_t _C); _CRTIMP int __cdecl iswctype(wint_t _C,wctype_t _Type); + _CRTIMP int __cdecl __iswcsymf(wint_t _C); + _CRTIMP int __cdecl __iswcsym(wint_t _C); #if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x600 && _WIN32_WINNT >= 0x0600) /* These are available since msvcr80.dll (__MSVCRT_VERSION__ >= 0x800), and in * msvcrt.dll (__MSVCRT_VERSION__ == 0x600) since Vista (_WIN32_WINNT >= 0x0600). */ @@ -158,8 +160,6 @@ int __cdecl isblank(int _C); _CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale); # endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */ _CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale); - _CRTIMP int __cdecl __iswcsymf(wint_t _C); - _CRTIMP int __cdecl __iswcsym(wint_t _C); #endif #if __MSVCRT_VERSION__ >= 0x800 /* These are only available since msvcr80.dll, never in msvcrt.dll. */ diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h index ca2c1fc70cb3..7cc047fe61d1 100644 --- a/mingw-w64-headers/crt/wchar.h +++ b/mingw-w64-headers/crt/wchar.h @@ -213,6 +213,8 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index); wint_t __cdecl towupper(wint_t _C); wint_t __cdecl towlower(wint_t _C); int __cdecl iswctype(wint_t _C,wctype_t _Type); + _CRTIMP int __cdecl __iswcsymf(wint_t _C); + _CRTIMP int __cdecl __iswcsym(wint_t _C); #if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x600 && _WIN32_WINNT >= 0x0600) /* These are available since msvcr80.dll (__MSVCRT_VERSION__ >= 0x800), and in * msvcrt.dll (__MSVCRT_VERSION__ == 0x600) since Vista (_WIN32_WINNT >= 0x0600). */ @@ -233,8 +235,6 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index); _CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale); _CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale); _CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale); - _CRTIMP int __cdecl __iswcsymf(wint_t _C); - _CRTIMP int __cdecl __iswcsym(wint_t _C); #endif #if __MSVCRT_VERSION__ >= 0x800 /* These are only available since msvcr80.dll, never in msvcrt.dll. */ diff --git a/mingw-w64-headers/crt/wctype.h b/mingw-w64-headers/crt/wctype.h index b45ba26c9e53..669b70c2897c 100644 --- a/mingw-w64-headers/crt/wctype.h +++ b/mingw-w64-headers/crt/wctype.h @@ -102,10 +102,8 @@ extern "C" { wint_t __cdecl towupper(wint_t); wint_t __cdecl towlower(wint_t); int __cdecl iswctype(wint_t,wctype_t); -#if __MSVCRT_VERSION__ >= 0x800 _CRTIMP int __cdecl __iswcsymf(wint_t); _CRTIMP int __cdecl __iswcsym(wint_t); -#endif int __cdecl is_wctype(wint_t,wctype_t); #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES) || defined (__cplusplus) int __cdecl iswblank(wint_t _C); -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public