From c62d1d21ab0f3ff34c1c695ff2132b5a9ff25eaa Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 2 Jun 2006 12:51:42 +0000 Subject: r16003: Tru64 doesn't have strtoll/strtoull but the size of 'long' is equal to the size of 'long long' so we can use strtol/strtoul Patch from Bjoern Jacke, thanks! (I only added the SIZEOF_LONG == SIZEOF_LONG_LONG) metze (This used to be commit 2bda7b63be1257210601dac3e2b1070f48d765b4) --- source4/lib/replace/replace.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/replace.c') diff --git a/source4/lib/replace/replace.c b/source4/lib/replace/replace.c index 6f51bd2e99..02c3d04163 100644 --- a/source4/lib/replace/replace.c +++ b/source4/lib/replace/replace.c @@ -394,6 +394,8 @@ duplicate a string 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 @@ -407,6 +409,8 @@ duplicate a string 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 -- cgit