diff options
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/configure.in b/source3/configure.in index e65d89ef4b..3083901f72 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -812,11 +812,16 @@ AC_TRY_RUN([ void foo(const char *format, ...) { va_list ap; int len; + char buf[5]; + va_start(ap, format); len = vsnprintf(0, 0, format, ap); va_end(ap); - if (len == 5) exit(0); - exit(1); + if (len != 5) exit(1); + + if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); + + exit(0); } main() { foo("hello"); } ], |