From 2efd71da49b9cfeab7987058cf5919e473ff466b Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 13 Oct 2022 16:08:46 +0200 Subject: Fix snprintf configure test for clang 15 Clang 15 -Wimplicit-int defaults to an error in C99 mode and above. A handful of tests have "main(..." and not "int main(..." which caused the tests to produce incorrect results. --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index de60a1b1..165c49de 100644 --- a/configure.ac +++ b/configure.ac @@ -713,7 +713,7 @@ case "$host" in AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include -main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) +int main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) exit(0); else exit(1); @@ -4259,7 +4259,7 @@ dnl test snprintf (broken on SCO w/gcc) #include #include #ifdef HAVE_SNPRINTF -main() +int main() { char buf[50]; char expected_out[50]; @@ -4276,7 +4276,7 @@ main() exit(0); } #else -main() { exit(0); } +int main() { exit(0); } #endif ]])], [ true ], [ AC_DEFINE([BROKEN_SNPRINTF]) ], AC_MSG_WARN([cross compiling: Assuming working snprintf()]) -- cgit v1.2.3