diff options
author | Rob Landley <rob@landley.net> | 2015-01-01 16:28:51 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-01-01 16:28:51 -0600 |
commit | 86c747a4493b2b1aabab9b20d1c4566fddeeb2ca (patch) | |
tree | fe5254ddbb277f19724c5bacb412e677f595d919 /lib/lib.h | |
parent | cf2516ab4bcf2c1d4cb571539dae794c6a40c5c6 (diff) | |
download | toybox-86c747a4493b2b1aabab9b20d1c4566fddeeb2ca.tar.gz |
strtol() doesn't return error indicator for overflow, it just sets errno. So add estrtol() (which clears errno first), and xstrtol() (which error_exit()s on overflow).
Diffstat (limited to 'lib/lib.h')
-rw-r--r-- | lib/lib.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -148,6 +148,8 @@ int64_t peek_be(void *ptr, unsigned size); int64_t peek(void *ptr, unsigned size); void poke(void *ptr, uint64_t val, int size); struct string_list *find_in_path(char *path, char *filename); +long estrtol(char *str, char **end, int base); +long xstrtol(char *str, char **end, int base); long atolx(char *c); long atolx_range(char *numstr, long low, long high); int numlen(long l); |