summaryrefslogtreecommitdiff
path: root/libc/string/generic/mempcpy.c
blob: bb5563a6aba0aa2c0b16df035b8a873efcb24f5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Copy memory to memory until the specified number of bytes
   has been copied, return pointer to following byte.
   Overlap is NOT handled correctly.
*/

/* Ditch the glibc version and just wrap memcpy. */

#include <string.h>

#ifdef __USE_GNU

# undef mempcpy
void *mempcpy (void *dstpp, const void *srcpp, size_t len)
{
  memcpy(dstpp, srcpp, len);
  return (void *)(((char *)dstpp) + len);
}
libc_hidden_weak(mempcpy)
strong_alias(mempcpy,__mempcpy)
#endif