mempcpy.c 522 B

1234567891011121314151617181920
  1. /* Copy memory to memory until the specified number of bytes
  2. has been copied, return pointer to following byte.
  3. Overlap is NOT handled correctly.
  4. */
  5. /* Ditch the glibc version and just wrap memcpy. */
  6. #include <string.h>
  7. #ifdef __USE_GNU
  8. /* Experimentally off - libc_hidden_proto(mempcpy) */
  9. /* Experimentally off - libc_hidden_proto(memcpy) */
  10. void *mempcpy (void *dstpp, const void *srcpp, size_t len)
  11. {
  12. memcpy(dstpp, srcpp, len);
  13. return (void *)(((char *)dstpp) + len);
  14. }
  15. libc_hidden_weak(mempcpy)
  16. #endif