]> granicus.if.org Git - postgresql/commitdiff
Use return instead of exit() in configure
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 30 Aug 2016 16:00:00 +0000 (12:00 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 30 Sep 2016 18:03:57 +0000 (14:03 -0400)
Using exit() requires stdlib.h, which is not included.  Use return
instead.  Also add return type for main().

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Thomas Munro <thomas.munro@enterprisedb.com>
config/c-compiler.m4
config/c-library.m4
configure

index a7f6773ae1354b41dcbea0b673a31a5555f4267c..7d901e1f1aa20e15e24da00d6db5b8ebaa4c88a1 100644 (file)
@@ -71,8 +71,10 @@ int does_int64_work()
     return 0;
   return 1;
 }
+
+int
 main() {
-  exit(! does_int64_work());
+  return (! does_int64_work());
 }])],
 [Ac_cachevar=yes],
 [Ac_cachevar=no],
index d330b0cf952ac58f677d323422bc3b0d3554a062..0a7452c176247ffa27090b139c60d9e16fe04ac5 100644 (file)
@@ -204,8 +204,10 @@ int does_int64_snprintf_work()
     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_modifier=$pgac_modifier; break],
 [],
index 55c771a11e9baa6207f8a96d660d1869bdeac29a..3eb0faf77dcacdc7050193f73f96ace8731c1a84 100755 (executable)
--- a/configure
+++ b/configure
@@ -13594,8 +13594,10 @@ int does_int64_work()
     return 0;
   return 1;
 }
+
+int
 main() {
-  exit(! does_int64_work());
+  return (! does_int64_work());
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
@@ -13676,8 +13678,10 @@ int does_int64_work()
     return 0;
   return 1;
 }
+
+int
 main() {
-  exit(! does_int64_work());
+  return (! does_int64_work());
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
@@ -13770,8 +13774,10 @@ int does_int64_snprintf_work()
     return 0;                  /* either multiply or snprintf is busted */
   return 1;
 }
+
+int
 main() {
-  exit(! does_int64_snprintf_work());
+  return (! does_int64_snprintf_work());
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :