Linux-man Archive mirror
 help / color / mirror / Atom feed
From: enh <enh@google.com>
To: linux-man <linux-man@vger.kernel.org>,
	 "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
Subject: [PATCH] ffs.3: all these functions live in <strings.h>.
Date: Mon, 13 Nov 2023 16:51:00 -0800	[thread overview]
Message-ID: <CAJgzZorddCz168wpwWTkq61eBxrU6C7iU2cUcWooUS7E8N8DWQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

In most cases you'll get them transitively through <string.h>, but it's
misleading for the man page to claim that they're _in_ <string.h>, and
especially weird to claim they're in _different_ headers from each
other!

This is also true of Apple's headers, and FreeBSD (the other BSDs only
have ffs(), not its siblings).

Signed-off-by: Elliott Hughes <enh@google.com>
---
 man3/ffs.3 | 6 ------
 1 file changed, 6 deletions(-)

[-- Attachment #2: 0001-ffs.3-all-these-functions-live-in-strings.h.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]

From 2862b4c94c01fda639fc1dd1fb94479eee1712b9 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <enh@google.com>
Date: Mon, 13 Nov 2023 16:46:43 -0800
Subject: [PATCH] ffs.3: all these functions live in <strings.h>.

In most cases you'll get them transitively through <string.h>, but it's
misleading for the man page to claim that they're _in_ <string.h>, and
especially weird to claim they're in _different_ headers from each
other!

This is also true of Apple's headers, and FreeBSD (the other BSDs only
have ffs(), not its siblings).

Signed-off-by: Elliott Hughes <enh@google.com>
---
 man3/ffs.3 | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/man3/ffs.3 b/man3/ffs.3
index 5a5e1c21c..aab5f1099 100644
--- a/man3/ffs.3
+++ b/man3/ffs.3
@@ -22,9 +22,6 @@ Standard C library
 .B #include <strings.h>
 .P
 .BI "int ffs(int " i );
-.P
-.B #include <string.h>
-.P
 .BI "int ffsl(long " i );
 .BI "int ffsll(long long " i );
 .fi
@@ -87,9 +84,6 @@ T{
 .BR ffsll ()
 T}	Thread safety	MT-Safe
 .TE
-.SH VERSIONS
-BSD systems have a prototype in
-.IR <string.h> .
 .SH STANDARDS
 .TP
 .BR ffs ()
-- 
2.42.0.869.gea05f2083d-goog


             reply	other threads:[~2023-11-14  0:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14  0:51 enh [this message]
2023-11-14 10:20 ` [PATCH] ffs.3: all these functions live in <strings.h> Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJgzZorddCz168wpwWTkq61eBxrU6C7iU2cUcWooUS7E8N8DWQ@mail.gmail.com \
    --to=enh@google.com \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).