summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/string/memcpy.316
-rw-r--r--lib/libc/string/wmemcpy.316
2 files changed, 10 insertions, 22 deletions
diff --git a/lib/libc/string/memcpy.3 b/lib/libc/string/memcpy.3
index e95d670ad9d..51c458ee3ec 100644
--- a/lib/libc/string/memcpy.3
+++ b/lib/libc/string/memcpy.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: memcpy.3,v 1.8 2011/07/25 00:38:52 schwarze Exp $
+.\" $OpenBSD: memcpy.3,v 1.9 2013/06/04 03:02:09 deraadt Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 25 2011 $
+.Dd $Mdocdate: June 4 2013 $
.Dt MEMCPY 3
.Os
.Sh NAME
@@ -50,6 +50,9 @@ bytes from buffer
.Fa src
to buffer
.Fa dst .
+If the two buffers may overlap,
+.Xr memmove 3
+must be used instead.
.Sh RETURN VALUES
The
.Fn memcpy
@@ -74,12 +77,3 @@ function first appeared in
.At V
and was reimplemented for
.Bx 4.3 Tahoe .
-.Sh CAVEATS
-In this implementation
-.Fn memcpy
-is implemented using
-.Xr bcopy 3 ,
-and therefore the buffers may overlap.
-On other systems, copying overlapping buffers may produce surprises.
-A portable, safe solution is to use
-.Xr memmove 3 .
diff --git a/lib/libc/string/wmemcpy.3 b/lib/libc/string/wmemcpy.3
index 1102640ad4f..4bbab2909fc 100644
--- a/lib/libc/string/wmemcpy.3
+++ b/lib/libc/string/wmemcpy.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: wmemcpy.3,v 1.3 2011/07/25 00:38:53 schwarze Exp $
+.\" $OpenBSD: wmemcpy.3,v 1.4 2013/06/04 03:02:09 deraadt Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 25 2011 $
+.Dd $Mdocdate: June 4 2013 $
.Dt WMEMCPY 3
.Os
.Sh NAME
@@ -50,6 +50,9 @@ wide characters from buffer
.Fa src
to buffer
.Fa dst .
+If the two buffers may overlap,
+.Xr wmemmove 3
+must be used instead.
.Sh RETURN VALUES
The
.Fn wmemcpy
@@ -74,12 +77,3 @@ function was ported from
.Nx
and first appeared in
.Ox 3.8 .
-.Sh CAVEATS
-In this implementation
-.Fn wmemcpy
-is implemented using
-.Xr bcopy 3 ,
-and therefore the buffers may overlap.
-On other systems, copying overlapping buffers may produce surprises.
-A portable, safe solution is to use
-.Xr wmemmove 3 .