diff options
Diffstat (limited to 'src/lib/libc/string/memcpy.3')
| -rw-r--r-- | src/lib/libc/string/memcpy.3 | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/lib/libc/string/memcpy.3 b/src/lib/libc/string/memcpy.3 index 1deb03631b..e95d670ad9 100644 --- a/src/lib/libc/string/memcpy.3 +++ b/src/lib/libc/string/memcpy.3 | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | .\" $OpenBSD: memcpy.3,v 1.8 2011/07/25 00:38:52 schwarze Exp $ | ||
| 2 | .\" | ||
| 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
| 2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
| 3 | .\" | 5 | .\" |
| @@ -29,9 +31,7 @@ | |||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
| 31 | .\" | 33 | .\" |
| 32 | .\" $OpenBSD: memcpy.3,v 1.7 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
| 33 | .\" | ||
| 34 | .Dd $Mdocdate: May 31 2007 $ | ||
| 35 | .Dt MEMCPY 3 | 35 | .Dt MEMCPY 3 |
| 36 | .Os | 36 | .Os |
| 37 | .Sh NAME | 37 | .Sh NAME |
| @@ -60,18 +60,26 @@ function returns the original value of | |||
| 60 | .Xr memccpy 3 , | 60 | .Xr memccpy 3 , |
| 61 | .Xr memmove 3 , | 61 | .Xr memmove 3 , |
| 62 | .Xr strcpy 3 , | 62 | .Xr strcpy 3 , |
| 63 | .Xr strlcpy 3 | 63 | .Xr strlcpy 3 , |
| 64 | .Xr wmemcpy 3 | ||
| 64 | .Sh STANDARDS | 65 | .Sh STANDARDS |
| 65 | The | 66 | The |
| 66 | .Fn memcpy | 67 | .Fn memcpy |
| 67 | function conforms to | 68 | function conforms to |
| 68 | .St -ansiC . | 69 | .St -ansiC . |
| 69 | .Sh BUGS | 70 | .Sh HISTORY |
| 71 | The | ||
| 72 | .Fn memcpy | ||
| 73 | function first appeared in | ||
| 74 | .At V | ||
| 75 | and was reimplemented for | ||
| 76 | .Bx 4.3 Tahoe . | ||
| 77 | .Sh CAVEATS | ||
| 70 | In this implementation | 78 | In this implementation |
| 71 | .Fn memcpy | 79 | .Fn memcpy |
| 72 | is implemented using | 80 | is implemented using |
| 73 | .Xr bcopy 3 , | 81 | .Xr bcopy 3 , |
| 74 | and therefore the buffers may overlap. | 82 | and therefore the buffers may overlap. |
| 75 | On other systems, copying overlapping buffers may produce surprises. | 83 | On other systems, copying overlapping buffers may produce surprises. |
| 76 | A simpler solution is to not use | 84 | A portable, safe solution is to use |
| 77 | .Fn memcpy . | 85 | .Xr memmove 3 . |
