diff options
author | unknown <joerg@mysql.com> | 2004-08-26 17:30:53 +0200 |
---|---|---|
committer | unknown <joerg@mysql.com> | 2004-08-26 17:30:53 +0200 |
commit | 1275b4c51314db24615efd7996a1d5266a03d2ba (patch) | |
tree | c8951dd1e0a372f4564a5682b7f39f0e8a42499d /strings/strto.c | |
parent | b6425bc22c73e1869e3e7b71fb1bf2d90a229927 (diff) | |
download | mariadb-git-1275b4c51314db24615efd7996a1d5266a03d2ba.tar.gz |
If the system has 64 bit "long", then "long long" does not add new
functionality. The existing code takes advantage of this when
"typedef"ing 'longlong' in 'my_global.h'. This holds for Alpha CPUs.
If the compiler then has prototypes for C99 functions 'strtoll()' and
'strtoull()' but no implementation, the existing code in 'strtoull.c'
collides with that prototype. These collisions are avoided now.
include/m_string.h:
Extend the "fake" approach from 'strtoull()' onto 'strtoll()'.
strings/strto.c:
Ensure that calling file has included necessary headers,
as these are needed at the upper level already.
strings/strtol.c:
Cleanup/alignment with the "long long" functions.
strings/strtoll.c:
When "long" is 64 bit already, system function 'strtol()' can be used.
Header files 'my_global.h' and 'm_string.h' will manage that,
if they are included early enough.
strings/strtoul.c:
Cleanup/alignment with the "long long" functions.
strings/strtoull.c:
When "long" is 64 bit already, system function 'strtoul()' can be used.
Header files 'my_global.h' and 'm_string.h' will manage that,
if they are included early enough.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'strings/strto.c')
-rw-r--r-- | strings/strto.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/strings/strto.c b/strings/strto.c index 52efec6e087..9e10b935834 100644 --- a/strings/strto.c +++ b/strings/strto.c @@ -35,8 +35,12 @@ it can be compiled with the UNSIGNED and/or LONGLONG flag set */ -#include <my_global.h> -#include "m_string.h" + +#if !defined(_global_h) || !defined(_m_string_h) +# error Calling file must include 'my_global.h' and 'm_string.h' + /* see 'strtoll.c' and 'strtoull.c' for the reasons */ +#endif + #include "m_ctype.h" #include "my_sys.h" /* defines errno */ #include <errno.h> |