com php-src: Fixed build failure introduced by PR #2158: TSRM/threads.m4

From: Date: Mon, 07 Nov 2016 11:04:22 +0000
Subject: com php-src: Fixed build failure introduced by PR #2158: TSRM/threads.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95421@lists.php.net to get a copy of this message
Commit: 3106f0e746a6fdea07fbd3aa22ed01d1b70816f0 Author: Bob Weinand <bobwei9@hotmail.com> Sat, 29 Oct 2016 18:49:38 +0200 Committer: Anatol Belski <ab@php.net> Mon, 7 Nov 2016 12:04:22 +0100 Parents: 12bb3cd8d2791d34be855cfa1f48de35bb5faebb Branches: PHP-7.0.13 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3106f0e746a6fdea07fbd3aa22ed01d1b70816f0 Log: Fixed build failure introduced by PR #2158 Note: AC_TRY_LINK interprets the source as part of a main function, ending up with int main() { /* ... */ int main() { /* ... */ } ; return 0; } here - Using AC_LINK_IFELSE with AC_LANG_SOURCE directly instead.. (cherry picked from commit 36527eccbb793ef15f828ffa4261d9a862144f07) Bugs: https://bugs.php.net/2158 Changed paths: M TSRM/threads.m4 Diff: diff --git a/TSRM/threads.m4 b/TSRM/threads.m4 index 7ef9202..57b46f2 100644 --- a/TSRM/threads.m4 +++ b/TSRM/threads.m4 @@ -66,10 +66,9 @@ dnl dnl Check whether the current setup can use POSIX threads calls dnl AC_DEFUN([PTHREADS_CHECK_COMPILE], [ -AC_TRY_LINK( [ +AC_LINK_IFELSE([ AC_LANG_SOURCE([ #include <pthread.h> #include <stddef.h> - ], [ void *thread_routine(void *data) { return data; @@ -81,7 +80,7 @@ int main() { int data = 1; pthread_mutexattr_init(&mattr); return pthread_create(&thd, NULL, thread_routine, &data); -} ], [ +} ]) ], [ pthreads_checked=yes ], [ pthreads_checked=no

« previous php.cvs (#95421) next »