Re: strtoi(3) ERANGE vs ENOTSUP

2024-01-20 Thread Alejandro Colomar
Hello Taylor, On Sat, Jan 20, 2024 at 07:07:57PM +, Taylor R Campbell wrote: > PR lib/57828 (https://gnats.NetBSD.org/57828) proposes changing an > edge case of the strtoi(3) function so that if ERANGE and ENOTSUP are > both applicable then it should fail with ERANGE rather than ENOTSUP. > >

Re: strtoi(3) ERANGE vs ENOTSUP

2024-01-20 Thread Mouse
> PR lib/57828 (https://gnats.NetBSD.org/57828) proposes changing an > edge case of the strtoi(3) function so that if ERANGE and ENOTSUP are > both applicable then it should fail with ERANGE rather than ENOTSUP. Has it ever been part of strtoi's contract which error it fails with if multiple error

strtoi(3) ERANGE vs ENOTSUP

2024-01-20 Thread Taylor R Campbell
PR lib/57828 (https://gnats.NetBSD.org/57828) proposes changing an edge case of the strtoi(3) function so that if ERANGE and ENOTSUP are both applicable then it should fail with ERANGE rather than ENOTSUP. This is the case when the number is out of range, and there's trailing garbage -- e.g., s="4