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

Commitf24374b

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 parentc10bb23 commitf24374b

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
@@ -251,8 +251,10 @@ int does_int64_snprintf_work()
251251
return 0;/* either multiply or snprintf is busted */
252252
return 1;
253253
}
254+
255+
int
254256
main() {
255-
exit(! does_int64_snprintf_work());
257+
return(! does_int64_snprintf_work());
256258
}],
257259
[pgac_cv_snprintf_long_long_int_format=$pgac_format; break],
258260
[],

‎configure

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25530,8 +25530,10 @@ int does_int64_work()
2553025530
return 0;
2553125531
return 1;
2553225532
}
25533+
25534+
int
2553325535
main() {
25534-
exit(! does_int64_work());
25536+
return(! does_int64_work());
2553525537
}
2553625538
_ACEOF
2553725539
rm -f conftest$ac_exeext
@@ -25669,8 +25671,10 @@ int does_int64_work()
2566925671
return 0;
2567025672
return 1;
2567125673
}
25674+
25675+
int
2567225676
main() {
25673-
exit(! does_int64_work());
25677+
return(! does_int64_work());
2567425678
}
2567525679
_ACEOF
2567625680
rm -f conftest$ac_exeext
@@ -25780,8 +25784,10 @@ int does_int64_snprintf_work()
2578025784
return 0;/* either multiply or snprintf is busted */
2578125785
return 1;
2578225786
}
25787+
25788+
int
2578325789
main() {
25784-
exit(! does_int64_snprintf_work());
25790+
return(! does_int64_snprintf_work());
2578525791
}
2578625792
_ACEOF
2578725793
rm -f conftest$ac_exeext

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp