diff options
author | unknown <bar@bar.mysql.r18.ru> | 2002-11-28 11:04:26 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2002-11-28 11:04:26 +0400 |
commit | e761be558d6e40db17734f1425372dd228404e5e (patch) | |
tree | 62676d19378fd941eff70094f9e4a1c62f113a64 /strings | |
parent | 48a64b57033b004d6e4fa92e5c13b21f0f24af22 (diff) | |
download | mariadb-git-e761be558d6e40db17734f1425372dd228404e5e.tar.gz |
New functions
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-simple.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index be4fdc9cb8d..b487159a733 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -18,6 +18,8 @@ #include "m_string.h" #include "m_ctype.h" #include "my_sys.h" /* defines errno */ +#include <errno.h> + #include "stdarg.h" #include "assert.h" @@ -246,8 +248,6 @@ void my_hash_sort_simple(CHARSET_INFO *cs, } -#define MY_ERRNO(y) - long my_strntol_8bit(CHARSET_INFO *cs, const char *nptr, uint l, char **endptr, int base) { @@ -349,14 +349,14 @@ long my_strntol_8bit(CHARSET_INFO *cs, if (overflow) { - MY_ERRNO(ERANGE); + my_errno=(ERANGE); return negative ? LONG_MIN : LONG_MAX; } return (negative ? -((long) i) : (long) i); noconv: - MY_ERRNO(EDOM); + my_errno=(EDOM); if (endptr != NULL) *endptr = (char *) nptr; return 0L; @@ -455,14 +455,14 @@ ulong my_strntoul_8bit(CHARSET_INFO *cs, if (overflow) { - MY_ERRNO(ERANGE); + my_errno=(ERANGE); return ((ulong)~0L); } return (negative ? -((long) i) : (long) i); noconv: - MY_ERRNO(EDOM); + my_errno=(EDOM); if (endptr != NULL) *endptr = (char *) nptr; return 0L; @@ -570,14 +570,14 @@ longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)), if (overflow) { - MY_ERRNO(ERANGE); + my_errno=(ERANGE); return negative ? LONGLONG_MIN : LONGLONG_MAX; } return (negative ? -((longlong) i) : (longlong) i); noconv: - MY_ERRNO(EDOM); + my_errno=(EDOM); if (endptr != NULL) *endptr = (char *) nptr; return 0L; @@ -677,14 +677,14 @@ ulonglong my_strntoull_8bit(CHARSET_INFO *cs, if (overflow) { - MY_ERRNO(ERANGE); + my_errno=(ERANGE); return (~(ulonglong) 0); } return (negative ? -((longlong) i) : (longlong) i); noconv: - MY_ERRNO(EDOM); + my_errno=(EDOM); if (endptr != NULL) *endptr = (char *) nptr; return 0L; |