diff -u -r config/c-compiler.m4 config/c-compiler.m4
--- config/c-compiler.m4	2016-10-24 22:19:49.000000000 +0200
+++ config/c-compiler.m4	2025-06-01 16:31:46.000000000 +0200
@@ -84,8 +84,10 @@
     return 0;
   return 1;
 }
+
+int
 main() {
-  exit(! does_int64_work());
+  return (! does_int64_work());
 }],
 [Ac_cachevar=yes],
 [Ac_cachevar=no],
diff -u -r config/c-library.m4 config/c-library.m4
--- config/c-library.m4	2016-10-24 22:19:49.000000000 +0200
+++ config/c-library.m4	2025-06-01 16:31:46.000000000 +0200
@@ -250,8 +250,10 @@
     return 0;			/* either multiply or snprintf is busted */
   return 1;
 }
+
+int
 main() {
-  exit(! does_int64_snprintf_work());
+  return (! does_int64_snprintf_work());
 }],
 [pgac_cv_snprintf_long_long_int_format=$pgac_format; break],
 [],
diff -u -r configure configure
--- configure	2016-10-24 22:19:49.000000000 +0200
+++ configure	2025-06-01 16:31:46.000000000 +0200
@@ -24432,8 +24432,10 @@
     return 0;
   return 1;
 }
+
+int
 main() {
-  exit(! does_int64_work());
+  return (! does_int64_work());
 }
 _ACEOF
 rm -f conftest$ac_exeext
@@ -24569,8 +24571,10 @@
     return 0;
   return 1;
 }
+
+int
 main() {
-  exit(! does_int64_work());
+  return (! does_int64_work());
 }
 _ACEOF
 rm -f conftest$ac_exeext
@@ -24727,8 +24731,10 @@
     return 0;			/* either multiply or snprintf is busted */
   return 1;
 }
+
+int
 main() {
-  exit(! does_int64_snprintf_work());
+  return (! does_int64_snprintf_work());
 }
 _ACEOF
 rm -f conftest$ac_exeext
