]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/atoi/strtoi.[ch]: strtoi_(), strtou_(): Add functions
authorAlejandro Colomar <alx@kernel.org>
Fri, 1 Dec 2023 21:34:31 +0000 (22:34 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 1 Feb 2024 04:26:19 +0000 (22:26 -0600)
commit34ff8edb63f17032c6a215331249883a9bdf8cd1
tree60cfcfcc14a0f5398608279a3800215331550cf8
parent49001ca846d1e2894b4719d66889ab7e1b4b698a
lib/atoi/strtoi.[ch]: strtoi_(), strtou_(): Add functions

These functions are identical to strtoi(3bsd) and strtou(3bsd), except
for one important thing: if both ERANGE and ENOTSUP conditions happen,
the BSD functions report ENOTSUP, which is bogus; our strtoi_() and
strtou_() report ERANGE.

Link: <https://lists.sr.ht/~hallyn/shadow/%3CZZoQDms6Sv6e5SPE%40debian%3E>
Link: <https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57828>
Cc: Thorsten Glaser <tg@mirbsd.de>
Cc: christos <christos@netbsd.org>
Cc: roy <roy@netbsd.org>
Cc: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/Makefile.am
lib/atoi/strtoi.c [new file with mode: 0644]
lib/atoi/strtoi.h [new file with mode: 0644]