Skip to content

Commit 1c0cf52

Browse files
committed
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>
1 parent f1a469c commit 1c0cf52

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

config/c-compiler.m4

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ int does_int64_work()
7171
return 0;
7272
return 1;
7373
}
74+
75+
int
7476
main() {
75-
exit(! does_int64_work());
77+
return (! does_int64_work());
7678
}])],
7779
[Ac_cachevar=yes],
7880
[Ac_cachevar=no],

config/c-library.m4

+3-1
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ int does_int64_snprintf_work()
204204
return 0; /* either multiply or snprintf is busted */
205205
return 1;
206206
}
207+
208+
int
207209
main() {
208-
exit(! does_int64_snprintf_work());
210+
return (! does_int64_snprintf_work());
209211
}]])],
210212
[pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break],
211213
[],

configure

+9-3
Original file line numberDiff line numberDiff line change
@@ -13594,8 +13594,10 @@ int does_int64_work()
1359413594
return 0;
1359513595
return 1;
1359613596
}
13597+
13598+
int
1359713599
main() {
13598-
exit(! does_int64_work());
13600+
return (! does_int64_work());
1359913601
}
1360013602
_ACEOF
1360113603
if ac_fn_c_try_run "$LINENO"; then :
@@ -13676,8 +13678,10 @@ int does_int64_work()
1367613678
return 0;
1367713679
return 1;
1367813680
}
13681+
13682+
int
1367913683
main() {
13680-
exit(! does_int64_work());
13684+
return (! does_int64_work());
1368113685
}
1368213686
_ACEOF
1368313687
if ac_fn_c_try_run "$LINENO"; then :
@@ -13770,8 +13774,10 @@ int does_int64_snprintf_work()
1377013774
return 0; /* either multiply or snprintf is busted */
1377113775
return 1;
1377213776
}
13777+
13778+
int
1377313779
main() {
13774-
exit(! does_int64_snprintf_work());
13780+
return (! does_int64_snprintf_work());
1377513781
}
1377613782
_ACEOF
1377713783
if ac_fn_c_try_run "$LINENO"; then :

0 commit comments

Comments
 (0)