public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Seth McDonald <sethmcmail@pm.me>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH v1 02/19] man/man2/access.2: HISTORY: Specify different access(2) prototypes
Date: Tue, 20 Jan 2026 02:34:08 +0100	[thread overview]
Message-ID: <aW7aOgFHOdCSiwUH@devuan> (raw)
In-Reply-To: <d87c7800e0f556efefaf5972294fb6a149bf02d1.1768822707.git.sethmcmail@pm.me>

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

Hi Seth,

On Mon, Jan 19, 2026 at 11:55:06AM +0000, Seth McDonald wrote:
> access(2) was specified in POSIX.1-1988 with the prototype
> int access(char *path, int amode); [1]
> 
> POSIX.1-1990 then changed the prototype to
> int access(const char *path, int amode); [2]

I suspect this is common to all APIs specified in those standards,
right?  Or is it specific to this API?

'const' was invented by ANSI C89, so I expect the change was around that
time.

On the change itself, it wasn't a breaking change: programs written
before the addition of const wouldn't notice that const has been added
to the prototype.

The change would be noticed by a program written today, but compiled in
such an old system.  However, I expect such a program to be aware that
pre-ANSI C was different, and it would have to adapt to it anyway.
const would be something that would have to be globally ignored, with
something like

	#define const

Given this should be of no importance to users, I'd prefer not
documenting this difference.

What do you think?


Cheers,
Alex

> [1] IEEE Std 1003.1-1988, Section 5.6.3 "File Accessibility".
> [2] IEEE Std 1003.1-1990, Section 5.6.3 "Check File Accessibility".
> 
> Signed-off-by: Seth McDonald <sethmcmail@pm.me>
> ---
>  man/man2/access.2 | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/man/man2/access.2 b/man/man2/access.2
> index 1ef65a982f04..c0bcf016ae5c 100644
> --- a/man/man2/access.2
> +++ b/man/man2/access.2
> @@ -342,6 +342,13 @@ .SH HISTORY
>  .TP
>  .BR faccessat2 ()
>  Linux 5.8.
> +.P
> +POSIX.1-1988 initially specified the function signature of
> +.BR access ()
> +with a non-const-qualified
> +.I path
> +parameter.
> +This was remedied in POSIX.1-1990.
>  .SH NOTES
>  .BR Warning :
>  Using these calls to check if a user is authorized to, for example,
> -- 
> 2.47.3
> 



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

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

  reply	other threads:[~2026-01-20  1:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-19 11:54 [PATCH v1 00/19] man/man2/*: Update history of syscalls A-CH Seth McDonald
2026-01-19 11:54 ` [PATCH v1 01/19] man/man2/access.2: HISTORY: Update first POSIX appearance of access(2) Seth McDonald
2026-01-19 11:55 ` [PATCH v1 02/19] man/man2/access.2: HISTORY: Specify different access(2) prototypes Seth McDonald
2026-01-20  1:34   ` Alejandro Colomar [this message]
2026-01-20 12:13     ` Seth McDonald
2026-01-20 13:52       ` History of const in C++, C89, and POSIX.1-1988 (was: [PATCH v1 02/19] man/man2/access.2: HISTORY: Specify different) Alejandro Colomar
2026-01-20 13:59         ` Alejandro Colomar
2026-01-21  6:12         ` Seth McDonald
2026-01-21 14:41           ` On restrict (a broken qualifier) Alejandro Colomar
2026-01-21 14:44           ` History of const in C++, C89, and POSIX.1-1988 (was: [PATCH v1 02/19] man/man2/access.2: HISTORY: Specify different) Alejandro Colomar
2026-01-19 11:55 ` [PATCH v1 03/19] man/man2/access.2: HISTORY: Update first POSIX appearance of faccessat(2) Seth McDonald
2026-01-19 11:55 ` [PATCH v1 04/19] man/man2/alarm.2: HISTORY: Update first POSIX appearance of alarm(2) Seth McDonald
2026-01-19 11:55 ` [PATCH v1 05/19] man/man2/chdir.2: HISTORY: Split chdir(2) and fchdir(2) Seth McDonald
2026-01-19 11:55 ` [PATCH v1 06/19] man/man2/chdir.2: HISTORY: Update first POSIX appearance of chdir(2) Seth McDonald
2026-01-19 11:56 ` [PATCH v1 07/19] man/man2/chdir.2: HISTORY: Specify different chdir(2) prototypes Seth McDonald
2026-01-19 11:56 ` [PATCH v1 08/19] man/man2/chdir.2: HISTORY: Update first POSIX appearance of fchdir(2) Seth McDonald
2026-01-19 11:56 ` [PATCH v1 09/19] man/man2/chmod.2: HISTORY: Split chmod(2) and fchmod(2) Seth McDonald
2026-01-19 11:56 ` [PATCH v1 10/19] man/man2/chmod.2: HISTORY: Update first POSIX appearance of chmod(2) Seth McDonald
2026-01-19 11:57 ` [PATCH v1 11/19] man/man2/chmod.2: HISTORY: Specify different chmod(2) prototypes Seth McDonald
2026-01-19 11:57 ` [PATCH v1 12/19] man/man2/chmod.2: HISTORY: Update first POSIX appearance of fchmod(2) Seth McDonald
2026-01-19 11:57 ` [PATCH v1 13/19] man/man2/chmod.2: HISTORY: Update first POSIX appearance of AT_SYMLINK_NOFOLLOW Seth McDonald
2026-01-19 11:57 ` [PATCH v1 14/19] man/man2/chown.2: HISTORY: Split chown(2), fchown(2), and lchown(2) Seth McDonald
2026-01-19 11:57 ` [PATCH v1 15/19] man/man2/chown.2: HISTORY: Update first POSIX appearance of chown(2) Seth McDonald
2026-01-19 11:58 ` [PATCH v1 16/19] man/man2/chown.2: HISTORY: Specify different chown(2) prototypes Seth McDonald
2026-01-19 11:58 ` [PATCH v1 17/19] man/man2/chown.2: HISTORY: Update first SUS appearance of fchown(2) Seth McDonald
2026-01-19 11:58 ` [PATCH v1 18/19] man/man2/chown.2: HISTORY: Update first POSIX appearance of lchown(2) Seth McDonald
2026-01-19 11:58 ` [PATCH v1 19/19] man/man2/chroot.2: HISTORY: Update first SUS appearance of chroot(2) Seth McDonald
2026-01-20  1:50 ` [PATCH v1 00/19] man/man2/*: Update history of syscalls A-CH 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=aW7aOgFHOdCSiwUH@devuan \
    --to=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=sethmcmail@pm.me \
    /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