diff options
Diffstat (limited to 'source4/lib/ldb/replace/replace.c')
-rw-r--r-- | source4/lib/ldb/replace/replace.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source4/lib/ldb/replace/replace.c b/source4/lib/ldb/replace/replace.c index 21d57605d0..2c2068f8f4 100644 --- a/source4/lib/ldb/replace/replace.c +++ b/source4/lib/ldb/replace/replace.c @@ -35,3 +35,35 @@ return i; } #endif + +#ifndef HAVE_STRTOLL + long long int strtoll(const char *str, char **endptr, int base) +{ +#ifdef HAVE_STRTOQ + return strtoq(str, endptr, base); +#elif defined(HAVE___STRTOLL) + return __strtoll(str, endptr, base); +#elif SIZEOF_LONG == SIZEOF_LONG_LONG + return (long long int) strtol(str, endptr, base); +#else +# error "You need a strtoll function" +#endif +} +#endif + + +#ifndef HAVE_STRTOULL + unsigned long long int strtoull(const char *str, char **endptr, int base) +{ +#ifdef HAVE_STRTOUQ + return strtouq(str, endptr, base); +#elif defined(HAVE___STRTOULL) + return __strtoull(str, endptr, base); +#elif SIZEOF_LONG == SIZEOF_LONG_LONG + return (unsigned long long int) strtoul(str, endptr, base); +#else +# error "You need a strtoull function" +#endif +} +#endif + |