]> git.saurik.com Git - apple/libc.git/blame - string/FreeBSD/memcpy.3.patch
Libc-339.tar.gz
[apple/libc.git] / string / FreeBSD / memcpy.3.patch
CommitLineData
59e0d9fe
A
1--- memcpy.3.orig Fri May 28 17:44:25 2004
2+++ memcpy.3 Fri May 28 17:45:22 2004
3@@ -41,7 +41,7 @@
4 .Os
5 .Sh NAME
6 .Nm memcpy
7-.Nd copy byte string
8+.Nd copy memory area
9 .Sh LIBRARY
10 .Lb libc
11 .Sh SYNOPSIS
12@@ -54,10 +54,22 @@
13 function
14 copies
15 .Fa len
16-bytes from string
17+bytes from memory area
9385eb3d 18 .Fa src
59e0d9fe
A
19-to string
20+to memory area
9385eb3d
A
21 .Fa dst .
22+If
23+.Fa src
24+and
25+.Fa dst
59e0d9fe 26+overlap, behavior is undefined.
9385eb3d
A
27+Applications in which
28+.Fa src
29+and
30+.Fa dst
31+might overlap should use
32+.Xr memmove 3
33+instead.
34 .Sh RETURN VALUES
35 The
36 .Fn memcpy
37@@ -75,17 +87,3 @@
38 function
39 conforms to
40 .St -isoC .
41-.Sh BUGS
42-In this implementation
43-.Fn memcpy
44-is implemented using
45-.Xr bcopy 3 ,
46-and therefore the strings may overlap.
47-On other systems, copying overlapping strings may produce surprises.
48-Programs intended to be portable should use
49-.Xr memmove 3
50-when
51-.Fa src
52-and
53-.Fa dst
54-may overlap.