diff --git a/reactos/lib/crtdll/string/memccpy.c b/reactos/lib/crtdll/string/memccpy.c index eda7e7ddc4b..ba13fa44cb3 100644 --- a/reactos/lib/crtdll/string/memccpy.c +++ b/reactos/lib/crtdll/string/memccpy.c @@ -6,4 +6,4 @@ _memccpy (void *to, const void *from,int c,size_t count) { memcpy(to,from,count); return memchr(to,c,count); -} \ No newline at end of file +} diff --git a/reactos/lib/crtdll/string/memcpy.c b/reactos/lib/crtdll/string/memcpy.c index 609afd4b5df..7a1f7f45912 100644 --- a/reactos/lib/crtdll/string/memcpy.c +++ b/reactos/lib/crtdll/string/memcpy.c @@ -1,15 +1,12 @@ -typedef unsigned int size_t; - -void * -memcpy (char *to, char *from, size_t count); +#include /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ void * -memcpy (char *to, char *from, size_t count) +memcpy (void *to, const void *from, size_t count) { - register char *f = from; - register char *t = to; + register char *f = (char *)from; + register char *t = (char *)to; register int i = count; while (i-- > 0) @@ -17,15 +14,3 @@ memcpy (char *to, char *from, size_t count) return to; } - -void *__constant_memcpy(char *to, char *from, size_t count) -{ - return memcpy(to,from,count); -} - -void *__memcpy(char *to, char *from, size_t count) -{ - return memcpy(to,from,count); -} - - diff --git a/reactos/lib/crtdll/string/memset.c b/reactos/lib/crtdll/string/memset.c index ef1069df3ae..286ff5d7bd4 100644 --- a/reactos/lib/crtdll/string/memset.c +++ b/reactos/lib/crtdll/string/memset.c @@ -1,8 +1,8 @@ -typedef int size_t; +#include void * memset(void *src,int val,size_t count) { - char *char_src = src; + char *char_src = (char *)src; while(count>0) { *char_src = val; @@ -11,19 +11,3 @@ void * memset(void *src,int val,size_t count) } return src; } - -void *__memset_generic(void *src,int val,size_t count) -{ - return memset(src,val,count); -} - -void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count) -{ - return memset(s,pattern,count); -} - - -void * __constant_c_memset(void *src,int val,size_t count) -{ - return memset(src,val,count); -} diff --git a/reactos/lib/ntdll/string/memchr.c b/reactos/lib/ntdll/string/memchr.c index cb0589fe24b..a0d57ddbe45 100644 --- a/reactos/lib/ntdll/string/memchr.c +++ b/reactos/lib/ntdll/string/memchr.c @@ -1,7 +1,6 @@ /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include +#include void * memchr(const void *s, int c, size_t n) diff --git a/reactos/lib/ntdll/string/memcpy.c b/reactos/lib/ntdll/string/memcpy.c index 0e117013f2b..7d18be3bfda 100644 --- a/reactos/lib/ntdll/string/memcpy.c +++ b/reactos/lib/ntdll/string/memcpy.c @@ -1,15 +1,12 @@ -typedef unsigned int size_t; - -void * -memcpy (char *to, char *from, size_t count); +#include /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ void * -memcpy (char *to, char *from, size_t count) +memcpy (void *to, const void *from, size_t count) { - register char *f = from; - register char *t = to; + register char *f = (char *)from; + register char *t = (char *)to; register int i = count; while (i-- > 0) diff --git a/reactos/lib/ntdll/string/memset.c b/reactos/lib/ntdll/string/memset.c index a17ed3f04f3..b59621a1975 100644 --- a/reactos/lib/ntdll/string/memset.c +++ b/reactos/lib/ntdll/string/memset.c @@ -1,8 +1,8 @@ -typedef int size_t; +#include void * memset(void *src,int val,size_t count) { - char *char_src = src; + char *char_src = (char *)src; while(count>0) { *char_src = val; diff --git a/reactos/ntoskrnl/rtl/memcpy.c b/reactos/ntoskrnl/rtl/memcpy.c index d307acb1482..73739854704 100644 --- a/reactos/ntoskrnl/rtl/memcpy.c +++ b/reactos/ntoskrnl/rtl/memcpy.c @@ -19,8 +19,8 @@ #undef memcpy void *memcpy (void *to, const void *from, size_t count) { - const char *f = from; - char *t = to; + const char *f = (char*)from; + char *t = (char *)to; int i = count; while (i-- > 0) diff --git a/reactos/ntoskrnl/rtl/memset.c b/reactos/ntoskrnl/rtl/memset.c index e74722a2ee9..49d1e730ef6 100644 --- a/reactos/ntoskrnl/rtl/memset.c +++ b/reactos/ntoskrnl/rtl/memset.c @@ -3,7 +3,7 @@ void * memset(void *src, int val, size_t count) { - char *char_src = src; + char *char_src = (char *)src; while(count>0) { *char_src = val;