diff options
Diffstat (limited to 'strings/strto.c')
-rw-r--r-- | strings/strto.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/strings/strto.c b/strings/strto.c index eb8caab2ab6..64b1c9a5ae9 100644 --- a/strings/strto.c +++ b/strings/strto.c @@ -42,13 +42,17 @@ #include "my_sys.h" /* defines errno */ #include <errno.h> -#ifdef LONGLONG +#undef strtoull +#undef strtoll +#undef strtoul +#undef strtol +#ifdef USE_LONGLONG #define UTYPE_MAX (~(ulonglong) 0) #define TYPE_MIN LONGLONG_MIN #define TYPE_MAX LONGLONG_MAX #define longtype longlong #define ulongtype ulonglong -#ifdef UNSIGNED +#ifdef USE_UNSIGNED #define function ulongtype strtoull #else #define function longtype strtoll @@ -59,7 +63,7 @@ #define TYPE_MAX LONG_MAX #define longtype long #define ulongtype unsigned long -#ifdef UNSIGNED +#ifdef USE_UNSIGNED #define function ulongtype strtoul #else #define function longtype strtol @@ -170,7 +174,7 @@ function (const char *nptr,char **endptr,int base) if (endptr != NULL) *endptr = (char *) s; -#ifndef UNSIGNED +#ifndef USE_UNSIGNED /* Check for a value that is within the range of `unsigned long int', but outside the range of `long int'. */ if (negative) @@ -185,7 +189,7 @@ function (const char *nptr,char **endptr,int base) if (overflow) { my_errno=ERANGE; -#ifdef UNSIGNED +#ifdef USE_UNSIGNED return UTYPE_MAX; #else return negative ? TYPE_MIN : TYPE_MAX; |