git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
978bbb4
)
r8462: added a test for %lld support to our snprintf() configure test.
author
Andrew Tridgell
<tridge@samba.org>
Thu, 14 Jul 2005 12:16:16 +0000
(12:16 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:23:05 +0000
(13:23 -0500)
our snprintf replacement code is going to be getting a good workout :)
(This used to be commit
3e9e5af4cee16e2316b544eebb489f87fd064ff4
)
source4/build/m4/rewrite.m4
patch
|
blob
|
history
diff --git
a/source4/build/m4/rewrite.m4
b/source4/build/m4/rewrite.m4
index 058cfade3b4b957dd89a2102ebb934789455c176..c6af661c43d36f8daf5d7261c684ad9522d2732c 100644
(file)
--- a/
source4/build/m4/rewrite.m4
+++ b/
source4/build/m4/rewrite.m4
@@
-452,7
+452,9
@@
AC_TRY_RUN([
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
@@
void foo(const char *format, ...) {
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"); }