[PATCH] man: strto[iu](): BUGS: Document precedence of ENOTSUP over ERANGE
Alejandro Colomar
alx at kernel.org
Sat Jan 20 17:20:41 UTC 2024
Hi Guillem, Thorsten,
On Sat, Jan 20, 2024 at 01:08:40AM +0100, Alejandro Colomar wrote:
> Link: <https://lists.sr.ht/~hallyn/shadow/%3CZZoQDms6Sv6e5SPE%40debian%3E>
> Cc: Guillem Jover <guillem at hadrons.org>
> Cc: Thorsten Glaser <tg at mirbsd.de>
> Cc: christos <christos at netbsd.org>
> Cc: roy <roy at netbsd.org>
> Signed-off-by: Alejandro Colomar <alx at kernel.org>
> ---
Great news!
NetBSD's christos has changed the behavior of their strtoi/u(3):
<https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57828>
<http://cvsweb.netbsd.org/bsdweb.cgi/src/common/lib/libc/stdlib/_strtoi.h?only_with_tag=MAIN>
<http://cvsweb.netbsd.org/bsdweb.cgi/src/common/lib/libc/stdlib/_strtoi.h.diff?r1=1.2&r2=1.3&only_with_tag=MAIN>
Therefore, I unsubmit this patch, and will send one for changing the
behavior in libbsd too.
Cheers,
Alex
> man/strtoi.3bsd | 9 +++++++++
> man/strtou.3bsd | 9 +++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/man/strtoi.3bsd b/man/strtoi.3bsd
> index 15102da..552d481 100644
> --- a/man/strtoi.3bsd
> +++ b/man/strtoi.3bsd
> @@ -238,3 +238,12 @@ .Sh HISTORY
> properly differentiate illegal returns.
> .Sh BUGS
> Ignores the current locale.
> +.Pp
> +If both
> +.Er ERANGE
> +and
> +.Er ENOTSUP
> +would happen,
> +this function reports
> +.Er ENOTSUP.
> +This makes it impossible to reliably check for out-of-range values.
> diff --git a/man/strtou.3bsd b/man/strtou.3bsd
> index d7e02eb..d09fd9c 100644
> --- a/man/strtou.3bsd
> +++ b/man/strtou.3bsd
> @@ -238,3 +238,12 @@ .Sh HISTORY
> properly differentiate illegal returns.
> .Sh BUGS
> Ignores the current locale.
> +.Pp
> +If both
> +.Er ERANGE
> +and
> +.Er ENOTSUP
> +would happen,
> +this function reports
> +.Er ENOTSUP.
> +This makes it impossible to reliably check for out-of-range values.
> --
> 2.43.0
>
--
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libbsd/attachments/20240120/2a1d767f/attachment.sig>
More information about the libbsd
mailing list