blob: 44032357405618e9f7c9c3e9954ba8575e3b1788 [file] [log] [blame]
extern void abort (void);
void *
memcpy (void *dst, const void *src, __SIZE_TYPE__ n)
{
const char *srcp;
char *dstp;
srcp = src;
dstp = dst;
if (dst < src)
{
if (dst + n > src)
abort ();
}
else
{
if (src + n > dst)
abort ();
}
while (n-- != 0)
*dstp++ = *srcp++;
return dst;
}