diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-22 03:46:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:29:55 -0500 |
commit | fe6eeeb60177c0b55366bcfb69be3acf8a95fb3b (patch) | |
tree | 8063b97279850e619a1cf57ba22205ea71040e08 /source4/lib/replace | |
parent | d55b75d8336326a2f8aaad2144e53d8b821a3b21 (diff) | |
download | samba-fe6eeeb60177c0b55366bcfb69be3acf8a95fb3b.tar.gz samba-fe6eeeb60177c0b55366bcfb69be3acf8a95fb3b.tar.bz2 samba-fe6eeeb60177c0b55366bcfb69be3acf8a95fb3b.zip |
r8698: attempt to cope with lack of strtoull() on HPUX
(This used to be commit c84c516b179fcbbcdb36c0c0aa4ffb4ff12f2c35)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r-- | source4/lib/replace/replace.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/lib/replace/replace.c b/source4/lib/replace/replace.c index 79b452d69c..20a420084a 100644 --- a/source4/lib/replace/replace.c +++ b/source4/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 |