You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
432 B
20 lines
432 B
20 years ago
|
/* Normally compiler builtins are used, but sometimes the compiler calls out
|
||
|
of line code. Based on asm-i386/string.h.
|
||
|
*/
|
||
|
#define _STRING_C
|
||
|
#include <linux/string.h>
|
||
|
|
||
|
#undef memmove
|
||
|
void *memmove(void * dest,const void *src,size_t count)
|
||
|
{
|
||
|
if (dest < src) {
|
||
|
__inline_memcpy(dest,src,count);
|
||
|
} else {
|
||
|
char *p = (char *) dest + count;
|
||
|
char *s = (char *) src + count;
|
||
|
while (count--)
|
||
|
*--p = *--s;
|
||
|
}
|
||
|
return dest;
|
||
|
}
|