blob: ebfd1e60a6a32bc4a53823fb148c3a4775c03284 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <sys/types.h>
/* gcc is broken and has a non-SUSv2 compliant internal prototype.
* This causes it to warn about a type mismatch here. Ignore it. */
void* memcpy(void* dst, const void* src, size_t count) {
register char *d=dst;
register const char *s=src;
++count; /* this actually produces better code than using count-- */
while (--count) {
*d = *s;
++d; ++s;
}
return dst;
}
|