svn commit: samba r8698 - in branches/SAMBA_4_0/source/lib/replace: .

tridge at samba.org tridge at samba.org
Fri Jul 22 03:46:58 GMT 2005


Author: tridge
Date: 2005-07-22 03:46:57 +0000 (Fri, 22 Jul 2005)
New Revision: 8698

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8698

Log:
attempt to cope with lack of strtoull() on HPUX

Modified:
   branches/SAMBA_4_0/source/lib/replace/replace.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.c	2005-07-22 03:35:28 UTC (rev 8697)
+++ branches/SAMBA_4_0/source/lib/replace/replace.c	2005-07-22 03:46:57 UTC (rev 8698)
@@ -512,7 +512,15 @@
 #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



More information about the samba-cvs mailing list