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.10.8rc1~23^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=719dd0837da2cb7e58a7d37064bca102e8e4e64e;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 af717b31262..0ba9bea828f 100644 --- a/configure.in +++ b/configure.in @@ -3625,12 +3625,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)],