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

Appearance settings

Commit 27acbd5

Browse filesBrowse 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> 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
1 parent 2939f61 commit 27acbd5
Copy full SHA for 27acbd5

File tree

Expand file treeCollapse file tree

3 files changed

+15
-5
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+15
-5
lines changed

‎config/c-compiler.m4

Copy file name to clipboardExpand all lines: config/c-compiler.m4
+3-1Lines changed: 3 additions & 1 deletion
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

Copy file name to clipboardExpand all lines: config/c-library.m4
+3-1Lines changed: 3 additions & 1 deletion
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

Copy file name to clipboardExpand all lines: configure
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13853,8 +13853,10 @@ int does_int64_work()
1385313853
return 0;
1385413854
return 1;
1385513855
}
13856+
13857+
int
1385613858
main() {
13857-
exit(! does_int64_work());
13859+
return (! does_int64_work());
1385813860
}
1385913861
_ACEOF
1386013862
if ac_fn_c_try_run "$LINENO"; then :
@@ -13935,8 +13937,10 @@ int does_int64_work()
1393513937
return 0;
1393613938
return 1;
1393713939
}
13940+
13941+
int
1393813942
main() {
13939-
exit(! does_int64_work());
13943+
return (! does_int64_work());
1394013944
}
1394113945
_ACEOF
1394213946
if ac_fn_c_try_run "$LINENO"; then :
@@ -14011,8 +14015,10 @@ int does_int64_snprintf_work()
1401114015
return 0; /* either multiply or snprintf is busted */
1401214016
return 1;
1401314017
}
14018+
14019+
int
1401414020
main() {
14015-
exit(! does_int64_snprintf_work());
14021+
return (! does_int64_snprintf_work());
1401614022
}
1401714023
_ACEOF
1401814024
if ac_fn_c_try_run "$LINENO"; then :

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.