[PATCH v2 1/3] include: Add wmemcpy to wchar.h
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- For https://bugs.winehq.org/show_bug.cgi?id=43300 include/msvcrt/wchar.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 984bd31c6f..4a6b788273 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -10,6 +10,7 @@ #include <crtdefs.h> #include <stdarg.h> +#include <string.h> #include <pshpack8.h> @@ -495,6 +496,11 @@ static inline int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n) return 0; } +static inline wchar_t* __cdecl wmemcpy(wchar_t *dst, const wchar_t *src, size_t n) +{ + return memcpy(dst, src, n * sizeof(wchar_t)); +} + #ifdef __cplusplus } #endif -- 2.17.0
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- For https://bugs.winehq.org/show_bug.cgi?id=43300 include/msvcrt/wchar.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 4a6b788273..2114c43e57 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -501,6 +501,11 @@ static inline wchar_t* __cdecl wmemcpy(wchar_t *dst, const wchar_t *src, size_t return memcpy(dst, src, n * sizeof(wchar_t)); } +static inline wchar_t* __cdecl wmemmove(wchar_t *dst, const wchar_t *src, size_t n) +{ + return memmove(dst, src, n * sizeof(wchar_t)); +} + #ifdef __cplusplus } #endif -- 2.17.0
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- For https://bugs.winehq.org/show_bug.cgi?id=43300 include/msvcrt/wchar.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 2114c43e57..ce5423ee27 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -506,6 +506,14 @@ static inline wchar_t* __cdecl wmemmove(wchar_t *dst, const wchar_t *src, size_t return memmove(dst, src, n * sizeof(wchar_t)); } +static inline wchar_t* __cdecl wmemset(wchar_t *s, wchar_t c, size_t n) +{ + size_t i; + for (i = 0; i < n; i++) + s[i] = c; + return s; +} + #ifdef __cplusplus } #endif -- 2.17.0
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
participants (2)
-
Alex Henrie -
Piotr Caban