Bug 273665 - strlen.3 HISTORY section is truncated
Summary: strlen.3 HISTORY section is truncated
Status: In Progress
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: David E. O'Brien
URL: https://cgit.freebsd.org/src/commit/?...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-09 22:39 UTC by John F. Carr
Modified: 2024-04-15 13:33 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John F. Carr 2023-09-09 22:39:50 UTC
The HISTORY section of lib/libc/string/strlen.3, added in commit 4b7f35db44cbf901e994fc9a4bcd4c98ebe8c4a1, is incomplete.  It is missing the text that says when strnlen appeared.  Here is the end of the file:

.Sh HISTORY
The
.Fn strlen
function first appeared in the Programmer's Workbench (PWB/UNIX)
and was ported to
.At v7 .
The
.Fn strnlen
Comment 1 Alexander Ziaee 2024-03-07 02:32:33 UTC
man.openbsd.org/strlen.3 says strlen was in version 6 AT&T unix, but I didn't see it on man.cat-v.org for v6 or v7. Netbsd and Linux manual pages were not informative on the matter.
Comment 2 John F. Carr 2024-03-16 21:44:11 UTC
strnlen was added to FreeBSD in 69099ba2ec8b01fe51a5c69b98990cde406c5ab8 in 2009.  The online version of 4.3 Reno at https://github.com/dank101/4.3BSD-Reno does not have strnlen.  It does have strncpy, strncmp, and strncat.

From https://pubs.opengroup.org/onlinepubs/9699919799/functions/strlen.html: "The strnlen() function is added from The Open Group Technical Standard, 2006, Extended API Set Part 1."

From OpenBSD: "The strnlen() function appeared in glibc 2.0 and was reimplemented for OpenBSD 4.8."
Comment 3 Alexander Ziaee 2024-03-17 00:37:23 UTC
I am not familiar with this topic. The other pages say .At v7 and use a semicolon. How do you feel about this?

.Sh HISTORY
The
.Fn strlen
function first appeared in the Programmer's Workbench (PWB/UNIX)
and was ported to
.At v7 ;
the
.Fn strnlen
function first appeared in
.At v7
and was reimplemented for
.Fx 8 .
Comment 4 Chris Davidson 2024-03-17 03:20:02 UTC
I looked into this more, specifically the commit id mentioned in the original submission: git show 4b7f35db44cbf901e994fc9a4bcd4c98ebe8c4a1

This looks to also appear in -CURRENT, looking through previous versions of the manual page, before the commit id above this is what I was able to find.

https://man.freebsd.org/cgi/man.cgi?query=strnlen&apropos=0&sektion=0&manpath=FreeBSD+13.1-RELEASE&arch=default&format=html 

This release does not go into the details of where it came from, the history section is not available.

My question would be: Is there anything mandating the HISTORY section? 

My recommendation would be to remove the HISTORY stuff, until more information could be found.
Comment 5 Wolfram Schneider freebsd_committer freebsd_triage 2024-03-17 05:49:57 UTC
The fix c4ff9276a969a3a691ee1f336ce4ed6c0c9b0b99 needs to be merged to stable/13 and stable/14 as well.
Comment 6 Wolfram Schneider freebsd_committer freebsd_triage 2024-04-15 13:33:53 UTC
(In reply to Wolfram Schneider from comment #5)

@obrien: can we merge the fix to stable/13 and stable/14? Thanks!