This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope
- From: "skunk at iskunk dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 May 2012 20:33:46 +0000
- Subject: [Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope
- Auto-submitted: auto-generated
- References: <bug-53238-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238
--- Comment #2 from Daniel Richard G. <skunk at iskunk dot org> 2012-05-04 20:33:46 UTC ---
(In reply to comment #1)
> You'll need to figure out why the configure test passes, most of us who work on
> that bit of code don't have access to AIX
Below is the relevant excerpt from gcc-4.7.0/libstdc++-v3/acinclude.m4:
----8<----
AC_MSG_CHECKING([whether it can be safely assumed that mutex_timedlock is
available])
AC_TRY_COMPILE([#include <unistd.h>],
[
// In case of POSIX threads check _POSIX_TIMEOUTS.
#if (defined(_PTHREADS) \
&& (!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS <= 0))
#error
#endif
], [ac_gthread_use_mutex_timedlock=1], [ac_gthread_use_mutex_timedlock=0])
AC_DEFINE_UNQUOTED(_GTHREAD_USE_MUTEX_TIMEDLOCK,
$ac_gthread_use_mutex_timedlock,
[Define to 1 if mutex_timedlock is available.])
if test $ac_gthread_use_mutex_timedlock = 1 ; then res_mutex_timedlock=yes ;
else res_mutex_timedlock=no ; fi
AC_MSG_RESULT([$res_mutex_timedlock])
---->8----
Neither _PTHREADS nor _POSIX_TIMEOUTS appear anywhere in /usr/include/.
I'm a little mystified as to why this test is relying entirely on feature test
macros, instead of checking for the existence of pthread_mutex_timedlock
directly...