summaryrefslogtreecommitdiff
path: root/source4/lib/replace/replace.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-02 12:51:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:48 -0500
commitc62d1d21ab0f3ff34c1c695ff2132b5a9ff25eaa (patch)
tree4f68bec2f68b4193fe485b2280c3de864700cf0c /source4/lib/replace/replace.c
parent4b74445676cb601e16e96d70224604d9bd6248c2 (diff)
downloadsamba-c62d1d21ab0f3ff34c1c695ff2132b5a9ff25eaa.tar.gz
samba-c62d1d21ab0f3ff34c1c695ff2132b5a9ff25eaa.tar.bz2
samba-c62d1d21ab0f3ff34c1c695ff2132b5a9ff25eaa.zip
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)
Diffstat (limited to 'source4/lib/replace/replace.c')
-rw-r--r--source4/lib/replace/replace.c4
1 files changed, 4 insertions, 0 deletions
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