.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\" SUCH DAMAGE.
.\"
.\" @(#)memcpy.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/string/memcpy.3,v 1.7 2002/01/07 06:03:37 dd Exp $
+.\" $FreeBSD: src/lib/libc/string/memcpy.3,v 1.9 2009/04/07 13:42:53 trasz Exp $
.\"
.Dd June 4, 1993
.Dt MEMCPY 3
.Os
.Sh NAME
.Nm memcpy
-.Nd copy byte string
+.Nd copy memory area
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
.In string.h
.Ft void *
-.Fn memcpy "void *dst" "const void *src" "size_t len"
+.Fo memcpy
+.Fa "void *restrict dst"
+.Fa "const void *restrict src"
+.Fa "size_t n"
+.Fc
.Sh DESCRIPTION
The
.Fn memcpy
function
copies
-.Fa len
-bytes from string
+.Fa n
+bytes from memory area
.Fa src
-to string
+to memory area
.Fa dst .
+If
+.Fa dst
+and
+.Fa src
+overlap, behavior is undefined.
+Applications in which
+.Fa dst
+and
+.Fa src
+might overlap should use
+.Xr memmove 3
+instead.
.Sh RETURN VALUES
The
.Fn memcpy
.Xr bcopy 3 ,
.Xr memccpy 3 ,
.Xr memmove 3 ,
-.Xr strcpy 3
+.Xr strcpy 3 ,
+.Xr wmemcpy 3
.Sh STANDARDS
The
.Fn memcpy
function
conforms to
.St -isoC .
-.Sh BUGS
-In this implementation
-.Fn memcpy
-is implemented using
-.Xr bcopy 3 ,
-and therefore the strings may overlap.
-On other systems, copying overlapping strings may produce surprises.
-Programs intended to be portable should use
-.Xr memmove 3
-when
-.Fa src
-and
-.Fa dst
-may overlap.