diff --git a/configure b/configure index bc763f95b..bc09113f1 100755 --- a/configure +++ b/configure @@ -18252,7 +18252,7 @@ else /* end confdefs.h. */ $ac_includes_default -int main(void) { return (snprintf(NULL, 0, "test") == 5); } +int main(void) { return !(snprintf(NULL, 0, "test") == 4); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : diff --git a/configure.ac b/configure.ac index 79367280c..aa7a9f20b 100644 --- a/configure.ac +++ b/configure.ac @@ -1008,7 +1008,7 @@ if test "x$ac_cv_func_snprintf" = xyes; then AC_MSG_CHECKING([for correct snprintf return value]) AC_RUN_IFELSE([AC_LANG_SOURCE(AC_INCLUDES_DEFAULT [[ -int main(void) { return (snprintf(NULL, 0, "test") == 5); } +int main(void) { return !(snprintf(NULL, 0, "test") == 4); } ]])], [AC_MSG_RESULT(yes)], [ AC_MSG_RESULT(no) AC_DEFINE([SNPRINTF_RET_BROKEN], [], [define if (v)snprintf does not return length needed, (but length used)])