}
#else
#ifdef HAVE_BSD_STRTOLL
-#ifdef HAVE_STRTOUQ
+#undef strtoull
unsigned long long int rep_strtoull(const char *str, char **endptr, int base)
{
- unsigned long long int nb = strtouq(str, endptr, base);
- /* In linux EINVAL is only returned if base is not ok */
+ unsigned long long int nb = strtoull(str, endptr, base);
+ /* With glibc EINVAL is only returned if base is not ok */
if (errno == EINVAL) {
if (base == 0 || (base >1 && base <37)) {
/* Base was ok so it's because we were not
}
return nb;
}
-#else
-#error "You need the strtouq function"
-#endif /* HAVE_STRTOUQ */
#endif /* HAVE_BSD_STRTOLL */
#endif /* HAVE_STRTOULL */