Add GNU extensions mempcpy and wmemcpy.
Used by elfutils. On the bright side, they stopped using __mempcpy.
Bug: 18374026
Change-Id: Id29bbe6ef1c5ed5a171bb6c32182f129d8332abb
diff --git a/libc/include/string.h b/libc/include/string.h
index d67928c..fffe136 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -44,6 +44,9 @@
extern void* memrchr(const void *, int, size_t) __purefunc;
extern int memcmp(const void *, const void *, size_t) __purefunc;
extern void* memcpy(void* __restrict, const void* __restrict, size_t);
+#if defined(__USE_GNU)
+extern void* mempcpy(void* __restrict, const void* __restrict, size_t);
+#endif
extern void* memmove(void *, const void *, size_t);
extern void* memset(void *, int, size_t);
extern void* memmem(const void *, size_t, const void *, size_t) __purefunc;
diff --git a/libc/include/wchar.h b/libc/include/wchar.h
index cfd2299..ea6aca0 100644
--- a/libc/include/wchar.h
+++ b/libc/include/wchar.h
@@ -151,6 +151,9 @@
extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
extern int wmemcmp(const wchar_t *, const wchar_t *, size_t);
extern wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t);
+#if defined(__USE_GNU)
+extern wchar_t *wmempcpy(wchar_t *, const wchar_t *, size_t);
+#endif
extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
extern int wprintf(const wchar_t *, ...);