don't produce a false negative for %z with CFLAGS=-Werror
(cherry picked from commit 800012de23)
This commit is contained in:
@@ -3625,12 +3625,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)],
|
||||
|
||||
Reference in New Issue
Block a user