crt: crtdll and msvcrt10: Add support for C95 getwc(), getwchar(), putwc(), putwchar() functions

All CRT libraries provide fgetwc, _fgetwchar, fputwc and _fputwchar
symbols. They are aliases of the C95 functions getwc, getwchar, putwc and
putwchar.

CRT libraries crtdll.dll and msvcrt10.dll do not export these functions
under C95 names. So define aliases in def files for C95+ compatibility.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Pali Rohár 2024-11-15 18:00:01 +01:00 committed by Martin Storsjö
parent f2b56d2672
commit 0cd510287b
3 changed files with 8 additions and 0 deletions

View File

@ -231,6 +231,12 @@ ADD_UNDERSCORE(y1)
ADD_UNDERSCORE(yn)
; This is list of symbol aliases for C95 functions
#ifdef WITH_GET_PUT_WCHAR_ALIASES
getwc == fgetwc
getwchar == _fgetwchar
putwc == fputwc
putwchar == _fputwchar
#endif
#ifdef USE_WCSTOK_S_FOR_WCSTOK
wcstok == wcstok_s
#endif

View File

@ -630,4 +630,5 @@ _ultow
#define NO_FPOS64_ALIASES
#define NO_STRCMPI_ALIAS
#define WITH_NEXTAFTER_ALIAS
#define WITH_GET_PUT_WCHAR_ALIASES
#include "crt-aliases.def.in"

View File

@ -1300,4 +1300,5 @@ wscanf
#define NO_FPOS64_ALIASES
#define NO_STRCMPI_ALIAS
#define WITH_NEXTAFTER_ALIAS
#define WITH_GET_PUT_WCHAR_ALIASES
#include "crt-aliases.def.in"