diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-14 12:16:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:23:05 -0500 |
commit | 66410ac4fd2a5aabe558244de33b6d9beebadd7c (patch) | |
tree | 71bf48fd0cb2a7037157d2e0c6a795cb4124a78b /source4/build | |
parent | 978bbb4f4da3078c0c562cfccc18b76f518eccea (diff) | |
download | samba-66410ac4fd2a5aabe558244de33b6d9beebadd7c.tar.gz samba-66410ac4fd2a5aabe558244de33b6d9beebadd7c.tar.bz2 samba-66410ac4fd2a5aabe558244de33b6d9beebadd7c.zip |
r8462: added a test for %lld support to our snprintf() configure test.
our snprintf replacement code is going to be getting a good workout :)
(This used to be commit 3e9e5af4cee16e2316b544eebb489f87fd064ff4)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/m4/rewrite.m4 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4 index 058cfade3b..c6af661c43 100644 --- 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"); } |