Commit 6d6bf3d6 authored by Mark Andrews's avatar Mark Andrews

don't produce a false negative for %z with CFLAGS=-Werror

(cherry picked from commit 800012de)
parent 28f17e82
......@@ -3773,12 +3773,14 @@ AC_CHECK_FUNC(vsnprintf, [],
AC_MSG_CHECKING(printf for %z support)
AC_TRY_RUN([
#include <stdio.h>
int
main() {
size_t j = 0;
char buf[100];
buf[0] = 0;
sprintf(buf, "%zu", j);
exit(strcmp(buf, "0") != 0);
return ((buf[0] == '0' && buf[1] == '\0') ? 0 : 1);
}
],
[AC_MSG_RESULT(yes)],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment