diff options
| author | Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> | 2025-12-16 17:04:30 +0100 |
|---|---|---|
| committer | Joseph Mingrone <jrm@FreeBSD.org> | 2026-01-15 09:45:42 -0400 |
| commit | 6a6f230d3143a1dedddf6fa99b83d040f0fafe53 (patch) | |
| tree | 94df96f2e5643ce627b6e239e7a39f6a73c6f5be /include | |
| parent | 73c921ef1d44f6e1590957a4beb48a967e3ca8c8 (diff) | |
libc/stdlib: Port strtonumx() from Illumos
Add strtonumx(), a companion to strtonum(3) that preserves its safety
and error-reporting semantics while allowing the caller to specify a
conversion base, similar to the strtol(3) family of functions.
Reviewed by: emaste, kib, ziaee
Obtained from: https://www.illumos.org/issues/15365
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54270
Diffstat (limited to 'include')
| -rw-r--r-- | include/stdlib.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index 3e54b5feb6de..305aea4b8672 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -333,6 +333,8 @@ int sradixsort(const unsigned char **, int, const unsigned char *, void srandomdev(void); long long strtonum(const char *, long long, long long, const char **); +long long + strtonumx(const char *, long long, long long, const char **, int); /* Deprecated interfaces, to be removed. */ __int64_t |
