summaryrefslogtreecommitdiffstats
path: root/source/lib/replace/replace.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-22 03:46:57 +0000
committerAndrew Tridgell <tridge@samba.org>2005-07-22 03:46:57 +0000
commit4ce9f3f018c430747917b35581788f47660fa968 (patch)
tree11b51d94965a8c3181dba735b493338ac5bfbb6e /source/lib/replace/replace.c
parent05d483422ee47cd4f9f2e78ef0fb4bb5fdd2f210 (diff)
downloadsamba-4ce9f3f018c430747917b35581788f47660fa968.tar.gz
samba-4ce9f3f018c430747917b35581788f47660fa968.tar.xz
samba-4ce9f3f018c430747917b35581788f47660fa968.zip
r8698: attempt to cope with lack of strtoull() on HPUX
Diffstat (limited to 'source/lib/replace/replace.c')
-rw-r--r--source/lib/replace/replace.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/lib/replace/replace.c b/source/lib/replace/replace.c
index 79b452d69c5..20a420084a1 100644
--- a/source/lib/replace/replace.c
+++ b/source/lib/replace/replace.c
@@ -512,7 +512,15 @@ int get_time_zone(time_t t)
#ifdef HAVE_STRTOUQ
return strtouq(str, endptr, base);
#else
-#error "system must support 64 bit integer read from strings"
+ unsigned long long int v;
+ if (sscanf(str, "%lli", &v) != 1) {
+ smb_panic("system does not support %lli in sscanf");
+ }
+ if (endptr) {
+ /* try to get endptr right - uggh */
+ strtoul(str, endptr, base);
+ }
+ return v;
#endif
}
#endif