d5591fb
commit 5eb796a369c64f18d55a6ae9b1fa9b35eea237fb
d5591fb
Author: Harmen Stoppels <harmenstoppels@gmail.com>
d5591fb
Date:   Thu Oct 13 16:08:46 2022 +0200
d5591fb
d5591fb
    Fix snprintf configure test for clang 15
d5591fb
    
d5591fb
    Clang 15 -Wimplicit-int defaults to an error in C99 mode and above.
d5591fb
    A handful of tests have "main(..." and not "int main(..." which caused
d5591fb
    the tests to produce incorrect results.
d5591fb
d5591fb
diff --git a/configure.ac b/configure.ac
d5591fb
index de60a1b1..165c49de 100644
d5591fb
--- a/configure.ac
d5591fb
+++ b/configure.ac
d5591fb
@@ -713,7 +713,7 @@ case "$host" in
d5591fb
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
d5591fb
 #include <mach-o/dyld.h>
d5591fb
 #include <stdlib.h>
d5591fb
-main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
d5591fb
+int main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
d5591fb
 		exit(0);
d5591fb
 	else
d5591fb
 		exit(1);
d5591fb
@@ -4259,7 +4259,7 @@ dnl test snprintf (broken on SCO w/gcc)
d5591fb
 #include <stdlib.h>
d5591fb
 #include <string.h>
d5591fb
 #ifdef HAVE_SNPRINTF
d5591fb
-main()
d5591fb
+int main()
d5591fb
 {
d5591fb
 	char buf[50];
d5591fb
 	char expected_out[50];
d5591fb
@@ -4276,7 +4276,7 @@ main()
d5591fb
 	exit(0);
d5591fb
 }
d5591fb
 #else
d5591fb
-main() { exit(0); }
d5591fb
+int main() { exit(0); }
d5591fb
 #endif
d5591fb
 		]])], [ true ], [ AC_DEFINE([BROKEN_SNPRINTF]) ],
d5591fb
 		AC_MSG_WARN([cross compiling: Assuming working snprintf()])