From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3320 invoked by alias); 5 May 2012 17:41:09 -0000 Received: (qmail 3306 invoked by uid 22791); 5 May 2012 17:41:07 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 05 May 2012 17:40:55 +0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope Date: Sat, 05 May 2012 17:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed AssignedTo Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg00580.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2012-05-05 AssignedTo|unassigned at gcc dot |redi at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #5 from Jonathan Wakely 2012-05-05 17:40:29 UTC --- Created attachment 27319 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27319 handle aix thread model Ah, I see. gthr-aix.h just does: #ifdef _THREAD_SAFE #include "gthr-posix.h" #else #include "gthr-single.h" #endif So it has everything in the posix thread model except the timedlock functions, but doesn't match the case statement that only looks for "posix". Your suggestion would work for the posix and aix thread models, but would break e.g. win32, where _PTHREADS won't be defined but mutexes always support timeouts (not that anyone has actually added __ghtread_mutex_timedlock to gthr-win32.h yet, but they should do) I think the right thing to do is define _PTHREADS for the aix thread model, could you test this patch? I've assumed that _THREAD_SAFE might be needed to enable some thread-related features on AIX, I don't know if that's true. An alternative patch would simply change the case statement to match posix|aix)