summaryrefslogtreecommitdiffstats
path: root/libc/string/generic/mempcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/generic/mempcpy.c')
-rw-r--r--libc/string/generic/mempcpy.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libc/string/generic/mempcpy.c b/libc/string/generic/mempcpy.c
new file mode 100644
index 000000000..46a2eaf92
--- /dev/null
+++ b/libc/string/generic/mempcpy.c
@@ -0,0 +1,18 @@
+/* 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>
+
+#undef mempcpy
+#undef __mempcpy
+
+void *__mempcpy (void *dstpp, const void *srcpp, size_t len)
+{
+ memcpy(dstpp, srcpp, len);
+ return (void *)(((char *)dstpp) + len);
+}
+weak_alias (__mempcpy, mempcpy)