1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03: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:
Peter Eisentraut
2020-09-08 10:09:56 +02:00
parent e0b4c7dd0b
commit 69fdf3d2e9
3 changed files with 15 additions and 5 deletions

View File

@ -105,8 +105,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],