@@ -15,12 +15,15 @@ mempcpy, wmempcpy \- copy memory area
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <string.h>
.PP
-.BI "void *mempcpy(void *" dest ", const void *" src ", size_t " n );
+.BI "void *mempcpy(void *restrict " dest ", const void *restrict " src \
+", size_t " n );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <wchar.h>
.PP
-.BI "wchar_t *wmempcpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
+.BI "wchar_t *wmempcpy(wchar_t *restrict " dest \
+", const wchar_t *restrict " src ,
+.BI " size_t " n );
.fi
.SH DESCRIPTION
The
glibc uses 'restrict' in mempcpy(), wmempcpy(). Let's use it here too. .../glibc$ grep_glibc_prototype mempcpy string/string.h:384: extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); .../glibc$ grep_glibc_prototype wmempcpy wcsmbs/wchar.h:276: extern wchar_t *wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; .../glibc$ Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> --- man3/mempcpy.3 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)