aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-01-01 16:28:51 -0600
committerRob Landley <rob@landley.net>2015-01-01 16:28:51 -0600
commit86c747a4493b2b1aabab9b20d1c4566fddeeb2ca (patch)
treefe5254ddbb277f19724c5bacb412e677f595d919 /lib/lib.h
parentcf2516ab4bcf2c1d4cb571539dae794c6a40c5c6 (diff)
downloadtoybox-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/lib.h b/lib/lib.h
index 00c7a05d..34c1a195 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -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);