summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko2006-10-10 21:00:47 +0000
committerDenis Vlasenko2006-10-10 21:00:47 +0000
commitcba9ef5523f09ecc3240f9f6efcdd0440c652c91 (patch)
tree79a2f859df1f6eef15defd02bd2f453735ed327e /include
parent1ac42bf66e2c181b886e89f9222cae65676c9e8a (diff)
downloadbusybox-cba9ef5523f09ecc3240f9f6efcdd0440c652c91.zip
busybox-cba9ef5523f09ecc3240f9f6efcdd0440c652c91.tar.gz
fixes from Vladimir Dronnikov <dronnikov@gmail.ru>
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 7b9b839..e4e67aa 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -89,23 +89,27 @@
/* "long" is long enough on this system */
# define STRTOOFF strtol
# define SAFE_STRTOOFF safe_strtol
+# define XSTRTOUOFF xstrtoul
# define OFF_FMT "%ld"
# else
-/* "long" is too short, need "lomg long" */
+/* "long" is too short, need "long long" */
# define STRTOOFF strtoll
# define SAFE_STRTOOFF safe_strtoll
+# define XSTRTOUOFF xstrtoull
# define OFF_FMT "%lld"
# endif
#else
-# if 0 /* UINT_MAX == 0xffffffff */
+# if 0 /* #if UINT_MAX == 0xffffffff */
/* Doesn't work. off_t is a long. gcc will throw warnings on printf("%d", off_t)
* even if long==int on this arch. Crap... */
# define STRTOOFF strtol
# define SAFE_STRTOOFF safe_strtoi
+# define XSTRTOUOFF xstrtou
# define OFF_FMT "%d"
# else
# define STRTOOFF strtol
# define SAFE_STRTOOFF safe_strtol
+# define XSTRTOUOFF xstrtoul
# define OFF_FMT "%ld"
# endif
#endif
@@ -313,6 +317,8 @@ struct suffix_mult {
unsigned int mult;
};
+unsigned long long xstrtoull(const char *numstr, int base);
+unsigned long long xatoull(const char *numstr);
unsigned long xstrtoul_range_sfx(const char *numstr, int base,
unsigned long lower,
unsigned long upper,
@@ -331,7 +337,6 @@ unsigned long xatoul_range(const char *numstr,
unsigned long lower,
unsigned long upper);
unsigned long xatoul(const char *numstr);
-unsigned long long xatoull(const char *numstr);
long xstrtol_range_sfx(const char *numstr, int base,
long lower,
long upper,