headers: Hide UTF-16 and UTF-32 functions from libmsvcrt
While these are standard C11 functions, Microsoft docs say they operate
on strings in UTF-8, instead of strings in the encoding determined by the
current locale. The MSVCRT `mbstate_t`, being an `int`, is too small for
implementations of these functions.
This commit ensures these functions are only declared for UCRT; when
targeting MSVCRT only the typedefs are available.
Reference: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/c16rtomb-c32rtomb1?view=msvc-170
Signed-off-by: LIU Hao <lh_mouse@126.com>
6 files changed