diff options
author | Zak Greant <zak@php.net> | 2002-06-07 15:07:55 +0000 |
---|---|---|
committer | Zak Greant <zak@php.net> | 2002-06-07 15:07:55 +0000 |
commit | 9daec6d2278fb671f486100faecbbbc5a42cb863 (patch) | |
tree | 671ce507dddd5a6f28d3fc9facba1d11fa3e6426 /ext/mysql/libmysql/strto.c | |
parent | fcd6d2b5cda9fc9ef582771b750c93ba09494828 (diff) | |
download | php-git-9daec6d2278fb671f486100faecbbbc5a42cb863.tar.gz |
Updating embedded libmysql to version 3.23.48
Diffstat (limited to 'ext/mysql/libmysql/strto.c')
-rw-r--r-- | ext/mysql/libmysql/strto.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/mysql/libmysql/strto.c b/ext/mysql/libmysql/strto.c index 0e1af5d2e7..b858ef19ea 100644 --- a/ext/mysql/libmysql/strto.c +++ b/ext/mysql/libmysql/strto.c @@ -28,13 +28,17 @@ This file is public domain and comes with NO WARRANTY of any kind */ #include "my_sys.h" /* defines errno */ #include <errno.h> -#ifdef MYSQL_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 @@ -45,7 +49,7 @@ This file is public domain and comes with NO WARRANTY of any kind */ #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 @@ -156,7 +160,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) @@ -171,7 +175,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; @@ -179,7 +183,7 @@ function (const char *nptr,char **endptr,int base) } /* Return the result of the appropriate sign. */ - return (negative ? -((longtype) i) : i); + return (negative ? -((longtype) i) : (longtype) i); noconv: /* There was no number to convert. */ |