tools/nolibc: implement strtol() and friends
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 25 Apr 2024 16:09:27 +0000 (18:09 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Sat, 29 Jun 2024 07:44:55 +0000 (09:44 +0200)
commit0cf24d36bb2723da861edb5cca30656fe2637cf7
tree02381678e5068c5a1ed6e91a74fbd0abf7dc0d70
parent8c3bd8bc40c2c6b1569c042407f9efedf2f1dee5
tools/nolibc: implement strtol() and friends

The implementation always works on uintmax_t values.

This is inefficient when only 32bit are needed.
However for all functions this only happens for strtol() on 32bit
platforms.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20240425-nolibc-strtol-v1-2-bfeef7846902@weissschuh.net
tools/include/nolibc/stdlib.h
tools/testing/selftests/nolibc/nolibc-test.c