svn commit: samba r8462 - in branches/SAMBA_4_0/source/build/m4: .
tridge at samba.org
tridge at samba.org
Thu Jul 14 12:16:16 GMT 2005
Author: tridge
Date: 2005-07-14 12:16:16 +0000 (Thu, 14 Jul 2005)
New Revision: 8462
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8462
Log:
added a test for %lld support to our snprintf() configure test.
our snprintf replacement code is going to be getting a good workout :)
Modified:
branches/SAMBA_4_0/source/build/m4/rewrite.m4
Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/rewrite.m4 2005-07-14 12:00:31 UTC (rev 8461)
+++ branches/SAMBA_4_0/source/build/m4/rewrite.m4 2005-07-14 12:16:16 UTC (rev 8462)
@@ -452,7 +452,9 @@
void foo(const char *format, ...) {
va_list ap;
int len;
- char buf[5];
+ char buf[20];
+ long long l = 1234567890;
+ l *= 100;
va_start(ap, format);
len = vsnprintf(buf, 0, format, ap);
@@ -466,6 +468,8 @@
if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
+ if (snprintf(buf, 20, "%lld", l) != 12 || strcmp(buf, "123456789000") != 0) exit(1);
+
exit(0);
}
main() { foo("hello"); }
More information about the samba-cvs
mailing list