Page MenuHomeFreeBSD

D57661.diff
No OneTemporary

D57661.diff

diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -12,6 +12,7 @@
altq.9 \
atomic.9 \
backlight.9 \
+ bcopy.9 \
bhnd.9 \
bhnd_erom.9 \
bios.9 \
@@ -228,7 +229,9 @@
mbuf_tags.9 \
mdchain.9 \
memcchr.9 \
+ memcpy.9 \
memguard.9 \
+ memmove.9 \
microseq.9 \
microtime.9 \
microuptime.9 \
diff --git a/share/man/man9/bcopy.9 b/share/man/man9/bcopy.9
new file mode 100644
--- /dev/null
+++ b/share/man/man9/bcopy.9
@@ -0,0 +1,98 @@
+.\" Copyright (c) 1990, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" Chris Torek.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 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. 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd June 19, 2026
+.Dt BCOPY 9
+.Os
+.Sh NAME
+.Nm bcopy
+.Nd copy bytes in object
+.Sh SYNOPSIS
+.In sys/systm.h
+.Ft void
+.Fn bcopy "const void *src" "void *dst" "size_t len"
+.Sh DESCRIPTION
+The
+.Fn bcopy
+function copies
+.Fa len
+bytes from object
+.Fa src
+to object
+.Fa dst .
+The two objects may overlap.
+If
+.Fa len
+is zero, no bytes are copied.
+.Pp
+The
+.Fn bcopy
+function is deprecated and
+.Fn memcpy
+or
+.Fn memmove
+should be used as appropriate in new code.
+.Sh SEE ALSO
+.Xr memcpy 9 ,
+.Xr memmove 9
+.Sh HISTORY
+A
+.Fn bcopy
+function appeared in
+.Bx 4.2 .
+.Pp
+.St -p1003.1-2008
+removes the specification of
+.Fn bcopy
+and it is marked as LEGACY in
+.St -p1003.1-2004 .
+New programs should use
+.Xr memmove 3 .
+If the input and output buffer do not overlap, then
+.Xr memcpy 3
+is more efficient.
+Note that
+.Fn bcopy
+takes
+.Ar src
+and
+.Ar dst
+in the opposite order from
+.Fn memmove
+and
+.Fn memcpy .
+In practice,
+.In sys/systm.h
+defines
+.Fn bcopy
+as a macro that calls
+.Fn memmove
+since
+.Fx 12.0 .
diff --git a/share/man/man9/memcpy.9 b/share/man/man9/memcpy.9
new file mode 100644
--- /dev/null
+++ b/share/man/man9/memcpy.9
@@ -0,0 +1,78 @@
+.\" Copyright (c) 1990, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" Chris Torek and the American National Standards Committee X3,
+.\" on Information Processing Systems.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 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. 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd June 19, 2026
+.Dt MEMCPY 9
+.Os
+.Sh NAME
+.Nm memcpy
+.Nd copy bytes in memory
+.Sh SYNOPSIS
+.In sys/systm.h
+.Ft void *
+.Fn memcpy "void *dst" "const void *src" "size_t len"
+.Sh DESCRIPTION
+The
+.Fn memcpy
+function copies
+.Fa len
+bytes from object
+.Fa src
+to object
+.Fa dst .
+If
+.Fa src
+and
+.Fa dst
+overlap, the results are not defined.
+.Sh RETURN VALUES
+The
+.Fn memcpy
+function
+returns the original value of
+.Fa dst .
+.Pp
+.Sh SEE ALSO
+.Xr bcopy 9 ,
+.Xr memmove 9
+.Sh STANDARDS
+The
+.Fn memcpy
+function
+conforms to
+.St -isoC .
+.Sh HISTORY
+The
+.Fn memcpy
+function first appeared in
+.At V
+and was reimplemented for
+.Bx 4.3 Tahoe .
diff --git a/share/man/man9/memmove.9 b/share/man/man9/memmove.9
new file mode 100644
--- /dev/null
+++ b/share/man/man9/memmove.9
@@ -0,0 +1,66 @@
+.\" Copyright (c) 1990, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" Chris Torek and the American National Standards Committee X3,
+.\" on Information Processing Systems.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 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. 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd June 19, 2026
+.Dt MEMMOVE 9
+.Os
+.Sh NAME
+.Nm memmove
+.Nd copy bytes in memory
+.Sh SYNOPSIS
+.In sys/systm.h
+.Ft void *
+.Fn memmove "void *dst" "const void *src" "size_t len"
+.Sh DESCRIPTION
+The
+.Fn memmove
+function copies
+.Fa len
+bytes from object
+.Fa src
+to object
+.Fa dst .
+The two objects may overlap;
+the copy is always done in a non-destructive manner.
+.Sh RETURN VALUES
+The
+.Fn memmove
+function returns the original value of
+.Fa dst .
+.Sh SEE ALSO
+.Xr bcopy 9 ,
+.Xr memcpy 9
+.Sh STANDARDS
+The
+.Fn memmove
+function
+conforms to
+.St -isoC .

File Metadata

Mime Type
text/plain
Expires
Tue, Jun 23, 8:21 PM (11 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34258136
Default Alt Text
D57661.diff (8 KB)

Event Timeline