mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-21 03:13:05 +08:00
Use return instead of exit() in configure
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> Backpatched because Apple macOS 10.16/11 (Big Sur) compiler makes calling undeclared functions an error, so these configure tests would fail. Reported-by: Thomas Gilligan <thomas.gilligan@icloud.com> Reported-by: Jesse Zhang <sbjesse@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/09A4B554-82B1-4536-B191-2461342EE0BB%40icloud.com
This commit is contained in:
parent
2939f613fa
commit
27acbd51e6
@ -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],
|
||||
|
@ -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],
|
||||
[],
|
||||
|
12
configure
vendored
12
configure
vendored
@ -13853,8 +13853,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 :
|
||||
@ -13935,8 +13937,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 :
|
||||
@ -14011,8 +14015,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 :
|
||||
|
Loading…
Reference in New Issue
Block a user