From b9e6da17b9766600007546d2f8e4cf74f35db279 Mon Sep 17 00:00:00 2001 From: araujo Date: Wed, 12 Aug 2015 00:49:20 +0000 Subject: Describe that bcopy(3) is deprecated and marked as LEGACY in POSIX.1-2001 and removed from the specification in POSIX.1-2008. New softwares shall use memcpy(3) or memmove(3). Differential Revision: D3358 Reviewed by: wblock Approved by: rodrigc Sponsored by: gandi.net --- lib/libc/string/bcopy.3 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'lib/libc/string') diff --git a/lib/libc/string/bcopy.3 b/lib/libc/string/bcopy.3 index 1608fad..ede910b 100644 --- a/lib/libc/string/bcopy.3 +++ b/lib/libc/string/bcopy.3 @@ -31,7 +31,7 @@ .\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd August 11, 2015 .Dt BCOPY 3 .Os .Sh NAME @@ -57,6 +57,20 @@ The two strings may overlap. If .Fa len is zero, no bytes are copied. +.Pp +This function is deprecated (marked as LEGACY in +POSIX.1-2001): use +.Xr memcpy 3 +or +.Xr memmove 3 +in new programs. +Note that the first two arguments are +interchanged for +.Xr memcpy 3 +and +.Xr memmove 3 . +POSIX.1-2008 removes the specification of +.Fn bcopy . .Sh SEE ALSO .Xr memccpy 3 , .Xr memcpy 3 , -- cgit v1.1 From 2115d98b6b95b9077f77d06b950b9d525af100b3 Mon Sep 17 00:00:00 2001 From: araujo Date: Thu, 13 Aug 2015 02:31:23 +0000 Subject: Remove the mention of memcpy(3) that is build on top of bcopy(3). Fix some phrases to make it more clear. Differential Revision: D3378 Reported by: bde@ Reviewed by: wblock Approved by: bapt, rodrigc (mentor) Sponsored by: gandi.net --- lib/libc/string/bcopy.3 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'lib/libc/string') diff --git a/lib/libc/string/bcopy.3 b/lib/libc/string/bcopy.3 index ede910b..19a71e1 100644 --- a/lib/libc/string/bcopy.3 +++ b/lib/libc/string/bcopy.3 @@ -31,7 +31,7 @@ .\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 11, 2015 +.Dd August 13, 2015 .Dt BCOPY 3 .Os .Sh NAME @@ -58,16 +58,14 @@ If .Fa len is zero, no bytes are copied. .Pp -This function is deprecated (marked as LEGACY in -POSIX.1-2001): use -.Xr memcpy 3 -or +This function is obsolete (marked as LEGACY in +POSIX.1-2001): please use .Xr memmove 3 in new programs. -Note that the first two arguments are -interchanged for -.Xr memcpy 3 -and +Note that +.Fn bcopy +takes its src and dst arguments in the opposite +order from .Xr memmove 3 . POSIX.1-2008 removes the specification of .Fn bcopy . -- cgit v1.1 From 0488e0470dfbdecc7c8865fc260ffa15c3d5e91f Mon Sep 17 00:00:00 2001 From: araujo Date: Fri, 14 Aug 2015 01:27:30 +0000 Subject: Make clear the bcopy(3) manpage regards when it was marked as LEGACY as well as when it was removed from POSIX specification. Reviewed by: theraven, wblock, bapt, rodrigc Approved by: bapt, rodrigc (mentor) Differential Revision: D3374 --- lib/libc/string/bcopy.3 | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'lib/libc/string') diff --git a/lib/libc/string/bcopy.3 b/lib/libc/string/bcopy.3 index 19a71e1..c1bb807 100644 --- a/lib/libc/string/bcopy.3 +++ b/lib/libc/string/bcopy.3 @@ -31,7 +31,7 @@ .\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 13, 2015 +.Dd August 14, 2015 .Dt BCOPY 3 .Os .Sh NAME @@ -57,18 +57,6 @@ The two strings may overlap. If .Fa len is zero, no bytes are copied. -.Pp -This function is obsolete (marked as LEGACY in -POSIX.1-2001): please use -.Xr memmove 3 -in new programs. -Note that -.Fn bcopy -takes its src and dst arguments in the opposite -order from -.Xr memmove 3 . -POSIX.1-2008 removes the specification of -.Fn bcopy . .Sh SEE ALSO .Xr memccpy 3 , .Xr memcpy 3 , @@ -87,3 +75,25 @@ before it was moved to for .St -p1003.1-2001 compliance. +.Pp +The +.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 . -- cgit v1.1 From d3a80abb42524748eb0e932fdb7448ac1b0d2c56 Mon Sep 17 00:00:00 2001 From: araujo Date: Mon, 24 Aug 2015 01:51:10 +0000 Subject: Update bzero(3) manpage to following the Posix Standard. Reviewed by: wblock, pfg Approved by: bapt (mentor) Differential Revision: D3380 --- lib/libc/string/bzero.3 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/libc/string') diff --git a/lib/libc/string/bzero.3 b/lib/libc/string/bzero.3 index 5af1bcf..130a652 100644 --- a/lib/libc/string/bzero.3 +++ b/lib/libc/string/bzero.3 @@ -31,7 +31,7 @@ .\" @(#)bzero.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd October 6, 2014 +.Dd August 24, 2015 .Dt BZERO 3 .Os .Sh NAME @@ -88,3 +88,11 @@ function first appeared in .Ox 5.5 and .Fx 11.0 . +.Pp +.St -p1003.1-2008 +removes the specification of +.Fn bzero +and it is marked as LEGACY in +.St -p1003.1-2004 . +For portability with other systems new programs should use +.Xr memset 3 . -- cgit v1.1 From 8ff00506cbb399395cfe74b7ca334f7dc34a4f18 Mon Sep 17 00:00:00 2001 From: araujo Date: Mon, 24 Aug 2015 01:53:18 +0000 Subject: Fix spelling. Reviewed by: wblock, pfg Approved by: bapt (mentor) Differential Revision: D3380 --- lib/libc/string/bcopy.3 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/libc/string') diff --git a/lib/libc/string/bcopy.3 b/lib/libc/string/bcopy.3 index c1bb807..ac480f8 100644 --- a/lib/libc/string/bcopy.3 +++ b/lib/libc/string/bcopy.3 @@ -31,7 +31,7 @@ .\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 14, 2015 +.Dd August 24, 2015 .Dt BCOPY 3 .Os .Sh NAME @@ -76,7 +76,6 @@ for .St -p1003.1-2001 compliance. .Pp -The .St -p1003.1-2008 removes the specification of .Fn bcopy -- cgit v1.1