All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: DJ Delorie <dj@redhat.com>
Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org
Subject: Re: The goal of the Linux man-pages project
Date: Wed, 5 Aug 2026 17:18:51 +0200	[thread overview]
Message-ID: <anNPRCcQxdq7nfmh@devuan> (raw)
In-Reply-To: <xnik5o4o5l.fsf@greed.delorie.com>

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

Hi DJ,

Thanks a lot for this feedback!  I appreciate the constructive tone!  :)

> Date: 2026-08-05 10:50:30-0400
> From: DJ Delorie <dj@redhat.com>
>
> Alejandro Colomar <alx@kernel.org> writes:
> > 	SYNOPSIS
> > 	     #include <string.h>  // see memory.h(3head)
> 
> This belongs in either SEE ALSO or FILES.

It's _also_ in SEE ALSO.

	$ MANWIDTH=64 man memcpy | grep -C1 memory.h
	SYNOPSIS
	     #include <string.h>  // see memory.h(3head)

	--
	SEE ALSO
	     memory.h(3head), bcopy(3),  memccpy(3),  memmove(3),  mem‐
	     pcpy(3), strcpy(3), strncpy(3), wmemcpy(3)

FILES is rarely used in man3; when used, it's more about configuration
files, and not includes.  SYNOPSIS is the main place where we currently
specify files.

Actually, this reminds me again of the documentation of types, which are
often provided in several header files.  I used NOTES in those, because
I couldn't think of a good section for that.  See for example the NOTES
section of size_t(3type):

	NOTES
	     size_t
		    The following headers also provide size_t: <aio.h>,
		    <glob.h>,   <grp.h>,    <iconv.h>,    <monetary.h>,
		    <mqueue.h>,     <ndbm.h>,    <pwd.h>,    <regex.h>,
		    <search.h>,  <signal.h>,   <stdio.h>,   <stdlib.h>,
		    <string.h>, <strings.h>, <sys/mman.h>, <sys/msg.h>,
		    <sys/sem.h>,      <sys/shm.h>,      <sys/socket.h>,
		    <sys/types.h>, <sys/uio.h>,  <time.h>,  <unistd.h>,
		    <wchar.h>, and <wordexp.h>.

	     ssize_t
		    The   following   headers   also  provide  ssize_t:
		    <aio.h>,   <monetary.h>,   <mqueue.h>,   <stdio.h>,
		    <sys/msg.h>,   <sys/socket.h>,   <sys/uio.h>,   and
		    <unistd.h>.

I think it could make sense to move that to a FILES section.

About being in SYNOPSIS, I think I want it there, because it's not there
as documenting a header file that provides this function, but mainly as
documenting that while it's provided by <string.h> it's not a string
function.

> > 	STANDARDS
> > 	     BSD.
> >
> > 	     These functions are also provided in <string.h>, as speci‐
> > 	     fied by ISO C.
> 
> Ok so far
> 
> >	     This is a historic mistake maintained  for
> > 	     compatibility  reasons.   Don’t  let  that fool you; these
> > 	     functions don’t necessarily operate on strings.
> 
> This just doesn't fit, it's far too opinionated and personal.  It needs
> to be more neutral and standards-respecting.
> 
>   "Historically, this file contained memory-related functions, while
>   string.h contained string-related functions, but currently these
>   functions are all in string.h, despite these not being string
>   functions, and typically memory.h just includes string.h for
>   compatibility across all the historic standards."
> 
> I'm not arguing against the message here, just the tone.

I believe your suggestion removes the idea that the message intended to
give, but I concede that the tone was too harsh.

	Author: Alejandro Colomar <alx@kernel.org>
	Date:   2026-08-05 17:11:04 +0200

	    man/man3head/memory.h.3head: STANDARDS: Neutralize the tone
	    
	    Reported-by: DJ Delorie <dj@redhat.com>
	    Signed-off-by: Alejandro Colomar <alx@kernel.org>

	diff --git a/man/man3head/memory.h.3head b/man/man3head/memory.h.3head
	index 6c04722c4cf3..59f91e2ed023 100644
	--- a/man/man3head/memory.h.3head
	+++ b/man/man3head/memory.h.3head
	@@ -65,8 +65,7 @@ .SH STANDARDS
	 These functions are also provided in
	 .IR <string.h> ,
	 as specified by ISO C.
	-This is a historic mistake maintained for compatibility reasons.
	-Don't let that fool you;
	+This is a historic mistake maintained for compatibility reasons;
	 these functions don't necessarily operate on strings.
	 .SH HISTORY
	 SVr1, 4.3BSD.

Removing the "don't let that fool you" should neutralize the tone.
I prefer keeping the "historic mistake maintained for compatibility
reasons", because it really was a mistake, and I believe it is good to
acknowledge mistakes.  Documenting a mistake doesn't mean we're
disrespecting the authors; just that with the information we have today,
we wish it was different.

> As for the message...
> 
> I think the only way we could be more persuasive is if we convinced the
> standards committees to actually segregate string and memory functions
> in the specifications, and tell you to ("shall") include string.h or
> memory.h accordingly, but that would break a lot of programs if it was
> actually required ("must").

Agreed.

> As an interim step, we could get the standards to specify string.h for
> string functions and memory.h for memory functions ("should"), knowing
> that either include gives you both,

That is more or less what my draft of the standards proposal says.

My proposal doesn't provide the str[^n]*() functions in <memory.h>,
though.  I think it's much better if that remains a vendor extension.

> and at a later date (after all the
> software is migrated) change to "shall" and start encouraging providers
> to actually segregate them.  Or offer a #define that strictly separates
> them to aid in migration, such as we do with other api-breaking
> standards changes.


Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-08-05 15:18 UTC|newest]

Thread overview: 145+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 21:18 [PATCH 0/2] alx-0097r1 - <memory.h>, the legitimate header for memcpy(3) et al Alejandro Colomar
2026-07-31 21:18 ` [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h> Alejandro Colomar
2026-07-31 21:23   ` Joseph Myers
2026-07-31 21:28     ` Alejandro Colomar
2026-07-31 21:54       ` Sam James
2026-07-31 22:18         ` Alejandro Colomar
2026-08-01  0:12           ` Alejandro Colomar
2026-08-01 14:43           ` Sam James
2026-07-31 21:51     ` on the irresponsibility of pursuing C language reform (was: [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h>) G. Branden Robinson
2026-07-31 21:59       ` on the irresponsibility of pursuing C language reform Sam James
2026-07-31 22:24         ` G. Branden Robinson
2026-07-31 23:19           ` Alejandro Colomar
2026-08-01 14:52           ` Sam James
2026-08-01 12:01         ` Alejandro Colomar
2026-08-01 12:04           ` Alejandro Colomar
2026-08-01 14:38           ` Sam James
2026-08-01 15:15             ` Alejandro Colomar
2026-08-01 16:10               ` Sam James
2026-08-01 17:09                 ` Alejandro Colomar
2026-08-01 21:34                   ` G. Branden Robinson
2026-08-01 22:22                     ` Alejandro Colomar
2026-08-01 22:26                       ` Alejandro Colomar
2026-08-03 13:42                       ` Joseph Myers
2026-08-03 14:22                         ` Alejandro Colomar
2026-08-03 14:38                         ` on glibc forking/reclaiming its man pages (was: on the irresponsibility of pursuing C language reform) G. Branden Robinson
2026-08-03 14:44                           ` Joseph Myers
2026-08-03 15:18                             ` G. Branden Robinson
     [not found]                   ` <CAETFuj2OwoyK9J85r2f0RoXbHbXKA4gQJ=JZ-7=QoqGcMwk0+Q@mail.gmail.com>
2026-08-01 22:44                     ` on the irresponsibility of pursuing C language reform Alejandro Colomar
2026-08-01 23:24                       ` Alejandro Colomar
2026-08-01 23:53                         ` proposed revision to memory.h(3head) (was: on the irresponsibility of pursuing C language reform) G. Branden Robinson
2026-08-02  0:27                           ` Alejandro Colomar
2026-08-02  1:03                             ` Alejandro Colomar
2026-08-03  0:47                             ` proposed revision to memory.h(3head) Alejandro Colomar
2026-08-03 17:58                               ` Mark Harris
2026-08-03 18:47                                 ` Alejandro Colomar
2026-08-03 20:14                                   ` Mark Harris
2026-08-03 23:36                                     ` Alejandro Colomar
2026-08-04  3:25                                       ` Mark Harris
2026-08-03 14:10                             ` proposed revision to memory.h(3head) (was: on the irresponsibility of pursuing C language reform) Joseph Myers
2026-08-03 14:31                               ` Alejandro Colomar
2026-08-02 12:52                         ` on the irresponsibility of pursuing C language reform Steve Summit
2026-08-02 13:17                           ` Alejandro Colomar
2026-08-02 13:45                             ` Steve Summit
2026-08-02 14:11                               ` Alejandro Colomar
2026-08-02 19:28                                 ` Paul Eggert
2026-08-02 20:31                                   ` Alejandro Colomar
2026-08-03  3:28                                     ` Paul Eggert
2026-08-03 11:39                                       ` Alejandro Colomar
2026-08-03 13:23               ` Joseph Myers
2026-08-01 20:18             ` G. Branden Robinson
2026-08-01 20:42               ` Alejandro Colomar
2026-08-01 20:45                 ` Alejandro Colomar
2026-08-01 20:52                 ` G. Branden Robinson
2026-08-01 21:12                   ` Alejandro Colomar
2026-07-31 22:10       ` on the irresponsibility of pursuing C language reform (was: [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h>) Joseph Myers
2026-07-31 22:21         ` Alejandro Colomar
2026-07-31 22:28           ` [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h> G. Branden Robinson
2026-07-31 22:42           ` on the irresponsibility of pursuing C language reform (was: [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h>) Joseph Myers
2026-07-31 22:52             ` Alejandro Colomar
2026-07-31 23:11               ` Joseph Myers
2026-07-31 23:32                 ` G. Branden Robinson
2026-08-01 12:39                   ` Alejandro Colomar
2026-08-01 14:26                   ` Christopher Bazley
2026-08-01 15:29                     ` Alejandro Colomar
2026-07-31 23:45                 ` on the irresponsibility of pursuing C language reform (was: " Alejandro Colomar
2026-08-01 12:39                   ` Douglas McIlroy
2026-08-01 19:54                     ` G. Branden Robinson
2026-08-01 20:35                       ` Alejandro Colomar
2026-07-31 23:08             ` [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h> G. Branden Robinson
2026-07-31 23:28               ` Joseph Myers
2026-07-31 23:57                 ` G. Branden Robinson
2026-08-01  0:06                   ` Alejandro Colomar
2026-07-31 22:05     ` Alejandro Colomar
2026-07-31 22:16       ` Joseph Myers
2026-07-31 22:33         ` Alejandro Colomar
2026-07-31 23:48     ` [PATCH 1/2] man/man3/{mem, strn}*(): " Collin Funk
2026-07-31 23:52       ` Alejandro Colomar
2026-08-01  0:01         ` Alejandro Colomar
2026-08-04  2:35         ` Thorsten Glaser
2026-07-31 21:19 ` [PATCH 2/2] man/man*/{string.3,memory.h.3head}: Move functions to a new page memory.h(3head) Alejandro Colomar
2026-07-31 21:20 ` [PATCH 0/2] alx-0097r1 - <memory.h>, the legitimate header for memcpy(3) et al Alejandro Colomar
2026-08-01  0:25 ` [PATCH v2] man/man3/mem*(): SYNOPSIS: Document non-standard mem*() functions as provided by <memory.h> Alejandro Colomar
2026-08-01 22:22   ` Bruno Haible
2026-08-01 22:38     ` Alejandro Colomar
2026-08-01 22:55       ` Bruno Haible
2026-08-01 23:10         ` Alejandro Colomar
2026-08-01 23:26           ` Collin Funk
2026-08-01 23:34             ` Alejandro Colomar
2026-08-01 23:29           ` Paul Eggert
2026-08-01 23:36             ` Alejandro Colomar
2026-08-02  0:08               ` the Linux man-pages as an educational tool (was: [PATCH v2] man/man3/mem*(): SYNOPSIS: Document non-standard mem*() functions as provided by <memory.h>) G. Branden Robinson
2026-08-02  0:45                 ` Alejandro Colomar
2026-08-02  1:04                   ` the Linux man-pages as an educational tool Collin Funk
2026-08-02  1:15                     ` G. Branden Robinson
2026-08-02  1:15                     ` Alejandro Colomar
2026-08-02  1:49                       ` Collin Funk
2026-08-02 11:29                         ` Alejandro Colomar
2026-08-02 11:47                           ` Alejandro Colomar
2026-08-02 12:04                       ` Alejandro Colomar
2026-08-02 21:23                       ` Maciej W. Rozycki
2026-08-02 21:34                         ` Alejandro Colomar
2026-08-02 23:08                           ` Arsen Arsenović
2026-08-02 23:10                             ` G. Branden Robinson
2026-08-02 23:27                               ` Collin Funk
2026-08-02 23:37                                 ` Alejandro Colomar
2026-08-02 23:41                                   ` Alejandro Colomar
2026-08-02 23:42                                     ` Alejandro Colomar
2026-08-03  1:12                                       ` Alejandro Colomar
2026-08-03  2:09                                       ` G. Branden Robinson
2026-08-03 12:21                                         ` Alejandro Colomar
2026-08-03 14:05                                           ` Sam James
2026-08-03 14:40                                             ` Alejandro Colomar
2026-08-03 15:34                                               ` G. Branden Robinson
2026-08-03 16:11                                                 ` Alejandro Colomar
2026-08-03 16:15                                               ` Sam James
2026-08-03 16:43                                                 ` Alejandro Colomar
2026-08-03 10:28                                   ` the Linux man-pages as an educational tool... and a bit about C Αγαθοκλής Χατζημανίκας
2026-08-03 14:03                                   ` the Linux man-pages as an educational tool Sam James
2026-08-03 14:28                                     ` Alejandro Colomar
2026-08-04  2:39                                     ` Collin Funk
2026-08-04 12:12                                       ` Alejandro Colomar
2026-08-04 15:49                                         ` Arsen Arsenović
2026-08-04 17:16                                           ` The goal of the Linux man-pages project Alejandro Colomar
2026-08-04 20:04                                             ` DJ Delorie
2026-08-04 23:07                                               ` Alejandro Colomar
2026-08-04 20:14                                             ` [GNULIB] " Αγαθοκλής Χατζημανίκας
2026-08-04 21:24                                               ` Αγαθοκλής Χατζημανίκας
2026-08-05  9:31                                             ` Arsen Arsenović
2026-08-05 14:15                                               ` Alejandro Colomar
2026-08-05 14:50                                                 ` DJ Delorie
2026-08-05 15:18                                                   ` Alejandro Colomar [this message]
2026-08-03 16:09                                   ` on project management (was: the Linux man-pages as an educational tool) G. Branden Robinson
2026-08-03 19:46                                     ` enh
2026-08-03 21:09                                       ` on project management Arsen Arsenović
2026-08-02 23:30                               ` the Linux man-pages as an educational tool Alejandro Colomar
2026-08-03 11:00                               ` Arsen Arsenović
2026-08-03 16:07                           ` Jeffrey Walton
2026-08-03 16:17                             ` Alejandro Colomar
2026-08-03 19:31                           ` Joseph Myers
2026-08-03 19:47                             ` Alejandro Colomar
2026-08-03 13:51                         ` When and why realloc(,0) was broken in glibc in 1999 Alejandro Colomar
2026-08-03 12:35                       ` the Linux man-pages as an educational tool Bruno Haible
2026-08-03 13:07                         ` Alejandro Colomar
2026-08-03 19:45                           ` Joseph Myers
2026-08-03 19:50                             ` 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=anNPRCcQxdq7nfmh@devuan \
    --to=alx@kernel.org \
    --cc=dj@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.