blob: 505cc622963c47cb7f5a7b671eb1cd2cf19eb784 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <string.h>
#include <features.h>
weak void *memcpy(void *restrict s1, const void *restrict s2, size_t n);
void *memcpy(void *restrict s1, const void *restrict s2, size_t n)
{
unsigned char *dest = (unsigned char *)s1;
const unsigned char *src = (const unsigned char *)s2;
while (n--) {
*dest++ = *src++;
}
return s1;
}
|