From 2c5bf68a5e7525ae9c50ee0dfc6d819da79c4861 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Tue, 21 Jul 2020 12:21:39 +0200 Subject: [PATCH] msvcrt: Copy wcscat implementation from ntdll. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/crtdll/crtdll.spec | 2 +- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr70/msvcr70.spec | 2 +- dlls/msvcr71/msvcr71.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.h | 1 + dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/wcs.c | 9 +++++++++ dlls/msvcrtd/msvcrtd.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 2 +- 13 files changed, 21 insertions(+), 11 deletions(-) diff --git a/dlls/crtdll/crtdll.spec b/dlls/crtdll/crtdll.spec index 45491455d09..aae66d828cc 100644 --- a/dlls/crtdll/crtdll.spec +++ b/dlls/crtdll/crtdll.spec @@ -504,7 +504,7 @@ @ cdecl vsprintf(ptr str ptr) MSVCRT_vsprintf @ cdecl vswprintf(ptr wstr ptr) MSVCRT_vswprintf @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp @ cdecl wcscoll(wstr wstr) MSVCRT_wcscoll diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index e37c0dbe5e4..68d1ee3f0f3 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1854,7 +1854,7 @@ @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb @ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 8f1d9f93970..13abe6ad64b 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -2212,7 +2212,7 @@ @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb @ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 731e001ac22..7181184938f 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2447,7 +2447,7 @@ @ stub vwscanf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb @ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index 2aa111cab50..d4114a24fef 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -850,7 +850,7 @@ @ cdecl vsprintf(ptr str ptr) MSVCRT_vsprintf @ cdecl vswprintf(ptr wstr ptr) MSVCRT_vswprintf @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp @ cdecl wcscoll(wstr wstr) MSVCRT_wcscoll diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index da6827789ef..c1b1c68f1f5 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -846,7 +846,7 @@ @ cdecl vsprintf(ptr str ptr) MSVCRT_vsprintf @ cdecl vswprintf(ptr wstr ptr) MSVCRT_vswprintf @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp @ cdecl wcscoll(wstr wstr) MSVCRT_wcscoll diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 1847a93c71f..916245cb269 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1534,7 +1534,7 @@ @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb @ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 8a53cf47a56..b2967858bc0 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1507,7 +1507,7 @@ @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb @ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 7e854704b10..7449cbb2de6 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -1210,6 +1210,7 @@ int __cdecl MSVCRT__iswlower_l(MSVCRT_wchar_t, MSVCRT__locale_t); int __cdecl MSVCRT__iswupper_l(MSVCRT_wchar_t, MSVCRT__locale_t); int __cdecl MSVCRT__iswprint_l(MSVCRT_wchar_t, MSVCRT__locale_t); int __cdecl MSVCRT__iswpunct_l(MSVCRT_wchar_t, MSVCRT__locale_t); +MSVCRT_size_t __cdecl MSVCRT_wcslen(const MSVCRT_wchar_t*); /* Maybe one day we'll enable the invalid parameter handlers with the full set of information (msvcrXXd) * #define MSVCRT_INVALID_PMT(x) MSVCRT_call_invalid_parameter_handler(x, __FUNCTION__, __FILE__, __LINE__, 0) diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index ac1269c53f8..51ecb095db0 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1481,7 +1481,7 @@ @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb @ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index b553f27d276..31ec0dd33fa 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -2255,6 +2255,15 @@ INT CDECL MSVCRT_wcscat_s(MSVCRT_wchar_t* dst, MSVCRT_size_t elem, const MSVCRT_ return MSVCRT_ERANGE; } +/*********************************************************************** + * wcscat (MSVCRT.@) + */ +MSVCRT_wchar_t* __cdecl MSVCRT_wcscat( MSVCRT_wchar_t *dst, const MSVCRT_wchar_t *src ) +{ + MSVCRT_wcscpy( dst + MSVCRT_wcslen(dst), src ); + return dst; +} + /********************************************************************* * wcsncat_s (MSVCRT.@) * diff --git a/dlls/msvcrtd/msvcrtd.spec b/dlls/msvcrtd/msvcrtd.spec index 0f6af7cce74..8c775c61a4a 100644 --- a/dlls/msvcrtd/msvcrtd.spec +++ b/dlls/msvcrtd/msvcrtd.spec @@ -802,7 +802,7 @@ @ cdecl vsprintf(ptr str ptr) MSVCRT_vsprintf @ cdecl vswprintf(ptr wstr ptr) MSVCRT_vswprintf @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp @ cdecl wcscoll(wstr wstr) MSVCRT_wcscoll diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 2367e5a08d8..25776494210 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2554,7 +2554,7 @@ @ cdecl ungetwc(long ptr) MSVCRT_ungetwc @ cdecl wcrtomb(ptr long ptr) MSVCRT_wcrtomb @ cdecl wcrtomb_s(ptr ptr long long ptr) MSVCRT_wcrtomb_s -@ cdecl wcscat(wstr wstr) ntdll.wcscat +@ cdecl wcscat(wstr wstr) MSVCRT_wcscat @ cdecl wcscat_s(wstr long wstr) MSVCRT_wcscat_s @ cdecl wcschr(wstr long) MSVCRT_wcschr @ cdecl wcscmp(wstr wstr) MSVCRT_wcscmp