summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJoshua Root <jmr@macports.org>2020-12-13 20:56:34 (GMT)
committerGitHub <noreply@github.com>2020-12-13 20:56:34 (GMT)
commit674fa0a740151e0416c9383f127b16014e805990 (patch)
treea117f25851f8fe60cadb98e195b70608e4c9a8b7 /configure
parent463c7d3d149283814d879a9bb8411af64e656c8e (diff)
downloadcpython-674fa0a740151e0416c9383f127b16014e805990.zip
cpython-674fa0a740151e0416c9383f127b16014e805990.tar.gz
cpython-674fa0a740151e0416c9383f127b16014e805990.tar.bz2
bpo-42598: Fix implicit function declarations in configure (GH-23690)
This is invalid in C99 and later and is an error with some compilers (e.g. clang in Xcode 12), and can thus cause configure checks to produce incorrect results.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 7 insertions, 6 deletions
diff --git a/configure b/configure
index 9ee750b..0c0aee9 100755
--- a/configure
+++ b/configure
@@ -11108,10 +11108,10 @@ else
main() {
pthread_attr_t attr;
pthread_t id;
- if (pthread_attr_init(&attr)) exit(-1);
- if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
- if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
- exit(0);
+ if (pthread_attr_init(&attr)) return (-1);
+ if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
+ if (pthread_create(&id, &attr, foo, NULL)) return (-1);
+ return (0);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -15130,7 +15130,7 @@ else
int main()
{
/* Success: exit code 0 */
- exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
+ return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
}
_ACEOF
@@ -15511,7 +15511,7 @@ else
int main()
{
- exit(((-1)>>3 == -1) ? 0 : 1);
+ return (((-1)>>3 == -1) ? 0 : 1);
}
_ACEOF
@@ -15981,6 +15981,7 @@ else
/* end confdefs.h. */
#include <poll.h>
+#include <unistd.h>
int main()
{