diff --git a/dlls/api-ms-win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec b/dlls/api-ms-win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec index f5b77d6a99c..c0e287321a9 100644 --- a/dlls/api-ms-win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec +++ b/dlls/api-ms-win-crt-convert-l1-1-0/api-ms-win-crt-convert-l1-1-0.spec @@ -102,7 +102,7 @@ @ cdecl -ret64 strtoull(str ptr long) ucrtbase.strtoull @ cdecl -ret64 strtoumax(str ptr long) ucrtbase.strtoumax @ cdecl wcrtomb(ptr long ptr) ucrtbase.wcrtomb -@ stub wcrtomb_s +@ cdecl wcrtomb_s(ptr ptr long long ptr) ucrtbase.wcrtomb_s @ cdecl wcsrtombs(ptr ptr long ptr) ucrtbase.wcsrtombs @ cdecl wcsrtombs_s(ptr ptr long ptr long ptr) ucrtbase.wcsrtombs_s @ cdecl wcstod(wstr ptr) ucrtbase.wcstod diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index cf4d6d4cd29..895298478d7 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1853,7 +1853,7 @@ @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb -@ stub wcrtomb_s +@ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s @ cdecl wcscat(wstr wstr) ntdll.wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 410aae44768..66c6f65a9b9 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -2211,7 +2211,7 @@ @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb -@ stub wcrtomb_s +@ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s @ cdecl wcscat(wstr wstr) ntdll.wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 171cfd27e18..8c9d93fd81b 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2446,7 +2446,7 @@ @ stub vwscanf @ stub vwscanf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb -@ stub wcrtomb_s +@ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s @ cdecl wcscat(wstr wstr) ntdll.wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index f9e3a0087f4..ba1b351e899 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -2108,7 +2108,7 @@ @ stub vwscanf @ stub vwscanf_s @ cdecl wcrtomb(ptr long ptr) msvcr120.wcrtomb -@ stub wcrtomb_s +@ cdecl wcrtomb_s(ptr ptr long long ptr) msvcr120.wcrtomb_s @ cdecl wcscat(wstr wstr) msvcr120.wcscat @ cdecl wcscat_s(wstr long wstr) msvcr120.wcscat_s @ cdecl wcschr(wstr long) msvcr120.wcschr diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 3fc18d2c8d1..f8d0920c3c9 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1533,7 +1533,7 @@ @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb -@ stub wcrtomb_s +@ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s @ cdecl wcscat(wstr wstr) ntdll.wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 4050f423823..d2f469a77dc 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1506,7 +1506,7 @@ @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb -@ stub wcrtomb_s +@ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s @ cdecl wcscat(wstr wstr) ntdll.wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index e6f0841f7f6..9f2a70c2f9d 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1480,7 +1480,7 @@ @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb -# stub wcrtomb_s(ptr ptr long long ptr) +@ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s @ cdecl wcscat(wstr wstr) ntdll.wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 6b8c7bbe0f3..f84963ce2e3 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -1821,6 +1821,20 @@ INT CDECL MSVCRT_wctob( MSVCRT_wint_t wchar ) return MSVCRT_EOF; } +/********************************************************************* + * wcrtomb_s (MSVCRT.@) + */ +INT CDECL MSVCRT_wcrtomb_s(MSVCRT_size_t *len, char *mbchar, + MSVCRT_size_t size, MSVCRT_wchar_t wch, MSVCRT_mbstate_t *s) +{ + int ilen, ret; + + if (s) *s = 0; + ret = MSVCRT_wctomb_s(&ilen, mbchar, size, wch); + if (len) *len = ilen; + return ret; +} + /********************************************************************* * wcrtomb (MSVCRT.@) */ diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 6b7a140b199..3b590ee2660 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2553,7 +2553,7 @@ @ cdecl ungetc(long ptr) MSVCRT_ungetc @ cdecl ungetwc(long ptr) MSVCRT_ungetwc @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb -@ stub wcrtomb_s +@ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s @ cdecl wcscat(wstr wstr) ntdll.wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr