8000 [3.9] bpo-42598: Fix implicit function declarations in configure (GH-23690) by miss-islington · Pull Request #23756 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.9] bpo-42598: Fix implicit function declarations in configure (GH-23690) #23756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix implicit function declarations in configure which could have resulted in
incorrect configuration checks. Patch contributed by Joshua Root.
13 changes: 7 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -11072,10 +11072,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 :
Expand Down Expand Up @@ -15083,7 +15083,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
Expand Down Expand Up @@ -15464,7 +15464,7 @@ else

int main()
{
exit(((-1)>>3 == -1) ? 0 : 1);
return (((-1)>>3 == -1) ? 0 : 1);
}

_ACEOF
Expand Down Expand Up @@ -15934,6 +15934,7 @@ else
/* end confdefs.h. */

#include <poll.h>
#include <unistd.h>

int main()
{
Expand Down
< 8000 /div>
13 changes: 7 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3313,10 +3313,10 @@ if test "$posix_threads" = "yes"; then
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);
}]])],
[ac_cv_pthread_system_supported=yes],
[ac_cv_pthread_system_supported=no],
Expand Down Expand Up @@ -4725,7 +4725,7 @@ then
int main()
{
/* Success: exit code 0 */
exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
}
]])],
[ac_cv_wchar_t_signed=yes],
Expand Down Expand Up @@ -4847,7 +4847,7 @@ AC_CACHE_VAL(ac_cv_rshift_extends_sign, [
AC_RUN_IFELSE([AC_LANG_SOURCE([[
int main()
{
exit(((-1)>>3 == -1) ? 0 : 1);
return (((-1)>>3 == -1) ? 0 : 1);
}
]])],
[ac_cv_rshift_extends_sign=yes],
Expand Down Expand Up @@ -4994,6 +4994,7 @@ AC_MSG_CHECKING(for broken poll())
AC_CACHE_VAL(ac_cv_broken_poll,
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <poll.h>
#include <unistd.h>

int main()
{
Expand Down
0