diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2024-08-03 20:13:24 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2024-08-03 20:13:24 +0000 |
commit | abf92e24cbe1b61b1dac99a2a04228b07a0d2833 (patch) | |
tree | 45e853d7f993c11736cac28d23ea992dc99f2a86 /lib | |
parent | 983ab123000bd4d6dc785e07a326fcba4325b640 (diff) |
The improbable occurred: strlcpy(3) and strlcat(3) are in POSIX-2024.
memmem(3) was also added. Update #include visibility and manpages
and add restrict qualifiers.
"never thought I'd see this day" millert@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/string/memmem.3 | 8 | ||||
-rw-r--r-- | lib/libc/string/strlcpy.3 | 15 |
2 files changed, 16 insertions, 7 deletions
diff --git a/lib/libc/string/memmem.3 b/lib/libc/string/memmem.3 index 3f178590836..de62d738dee 100644 --- a/lib/libc/string/memmem.3 +++ b/lib/libc/string/memmem.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: memmem.3,v 1.3 2020/04/16 12:40:41 claudio Exp $ +.\" $OpenBSD: memmem.3,v 1.4 2024/08/03 20:13:23 guenther Exp $ .\" .\" Copyright (c) 2005 Pascal Gloor <pascal.gloor@spale.com> .\" @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: April 16 2020 $ +.Dd $Mdocdate: August 3 2024 $ .Dt MEMMEM 3 .Os .Sh NAME @@ -66,8 +66,10 @@ is returned. .Xr strchr 3 , .Xr strstr 3 .Sh STANDARDS +The .Fn memmem -is a GNU extension. +function conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn memmem diff --git a/lib/libc/string/strlcpy.3 b/lib/libc/string/strlcpy.3 index a14145e199f..46072898838 100644 --- a/lib/libc/string/strlcpy.3 +++ b/lib/libc/string/strlcpy.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strlcpy.3,v 1.27 2019/01/25 00:19:25 millert Exp $ +.\" $OpenBSD: strlcpy.3,v 1.28 2024/08/03 20:13:23 guenther Exp $ .\" .\" Copyright (c) 1998, 2000 Todd C. Miller <millert@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 25 2019 $ +.Dd $Mdocdate: August 3 2024 $ .Dt STRLCPY 3 .Os .Sh NAME @@ -24,9 +24,9 @@ .Sh SYNOPSIS .In string.h .Ft size_t -.Fn strlcpy "char *dst" "const char *src" "size_t dstsize" +.Fn strlcpy "char * restrict dst" "const char * restrict src" "size_t dstsize" .Ft size_t -.Fn strlcat "char *dst" "const char *src" "size_t dstsize" +.Fn strlcat "char * restrict dst" "const char * restrict src" "size_t dstsize" .Sh DESCRIPTION The .Fn strlcpy @@ -174,6 +174,13 @@ As a matter of fact, the first version of this manual page got it wrong. .Xr strncat 3 , .Xr strncpy 3 , .Xr wcslcpy 3 +.Sh STANDARDS +The +.Fn strlcat +and +.Fn strlcpy +functions conform to +.St -p1003.1-2024 . .Sh HISTORY .Fn strlcpy and |