Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit47fca01

Browse files
committed
Use return instead of exit() in configure
Using exit() requires stdlib.h, which is not included. Use returninstead. Also add return type for main().This back-patches commit1c0cf52 into out-of-support branches,pursuant to a newly-established project policy that we'll try to keepout-of-support branches buildable on modern platforms for at leastten major releases back, ensuring people can test pg_dump and psqlcompatibility against servers that far back. With the currentdevelopment branch being v15, that works out to keeping 9.2 and upbuildable as of today.This fix is needed to get through 'configure' when using recentmacOS (and possibly other clang-based toolchains). It seems tobe sufficient to get through 'check-world', although there areannoyances such as compiler warnings, which will be dealt withseparately.Original patch by Peter EisentrautDiscussion:https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com
1 parent30ffdd2 commit47fca01

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

‎config/c-compiler.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ int does_int64_work()
8484
return 0;
8585
return 1;
8686
}
87+
88+
int
8789
main() {
88-
exit(! does_int64_work());
90+
return(! does_int64_work());
8991
}],
9092
[Ac_cachevar=yes],
9193
[Ac_cachevar=no],

‎config/c-library.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,10 @@ int does_int64_snprintf_work()
255255
return 0;/* either multiply or snprintf is busted */
256256
return 1;
257257
}
258+
259+
int
258260
main() {
259-
exit(! does_int64_snprintf_work());
261+
return(! does_int64_snprintf_work());
260262
}],
261263
[pgac_cv_snprintf_long_long_int_format=$pgac_format; break],
262264
[],

‎configure

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13757,8 +13757,10 @@ int does_int64_work()
1375713757
return 0;
1375813758
return 1;
1375913759
}
13760+
13761+
int
1376013762
main() {
13761-
exit(! does_int64_work());
13763+
return(! does_int64_work());
1376213764
}
1376313765
_ACEOF
1376413766
if ac_fn_c_try_run"$LINENO";then:
@@ -13839,8 +13841,10 @@ int does_int64_work()
1383913841
return 0;
1384013842
return 1;
1384113843
}
13844+
13845+
int
1384213846
main() {
13843-
exit(! does_int64_work());
13847+
return(! does_int64_work());
1384413848
}
1384513849
_ACEOF
1384613850
if ac_fn_c_try_run"$LINENO";then:
@@ -13915,8 +13919,10 @@ int does_int64_snprintf_work()
1391513919
return 0;/* either multiply or snprintf is busted */
1391613920
return 1;
1391713921
}
13922+
13923+
int
1391813924
main() {
13919-
exit(! does_int64_snprintf_work());
13925+
return(! does_int64_snprintf_work());
1392013926
}
1392113927
_ACEOF
1392213928
if ac_fn_c_try_run"$LINENO";then:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp