From: Mark Andrews Date: Wed, 16 May 2018 03:50:13 +0000 (+1000) Subject: don't produce a false negative for %z with CFLAGS=-Werror X-Git-Tag: v9.9.13rc1~25^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4ae45a2b7fe68b783c92c03048ae95dcbd0e7a0;p=thirdparty%2Fbind9.git don't produce a false negative for %z with CFLAGS=-Werror (cherry picked from commit 800012de23ef63ff6d34dd7dac99cd2291955640) --- diff --git a/configure.in b/configure.in index 69d7e742b09..0943ebb98de 100644 --- a/configure.in +++ b/configure.in @@ -2878,12 +2878,14 @@ AC_CHECK_FUNC(vsnprintf, [], AC_MSG_CHECKING(printf for %z support) AC_TRY_RUN([ #include + +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)],