From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24069 invoked by alias); 27 Aug 2011 14:37:07 -0000 Received: (qmail 23848 invoked by uid 22791); 27 Aug 2011 14:37:06 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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, 27 Aug 2011 14:36:49 +0000 From: "watsonsong at foxmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/50196] [C++0x] std::thread not available under macos Date: Sat, 27 Aug 2011 15:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: watsonsong at foxmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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: 2011-08/txt/msg02229.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50196 --- Comment #2 from watsonsong 2011-08-27 14:36:44 UTC --- I use macport to install gcc4.6 on my computer, and I add -D_GLIBCXX_HAS_GTHREADS flag to g++ and it report errors: /opt/local/include/gcc46/c++/x86_64-apple-darwin10/bits/c++config.h:159:20: error: 'NULL' was not declared in this scope /opt/local/include/gcc46/c++/x86_64-apple-darwin10/bits/c++config.h:159:38: error: invalid type in declaration bebore ';' token /opt/local/include/gcc46/c++/mutex:276:52: error: there are no arguments to '__gthread_mutex_timedlock' that depend on a template parameter, so a declaration of '__gthread_mutex_timedlock' must be availiable [-fpermissive] /opt/local/include/gcc46/c++/mutex:383:62: error: there are no arguments to '__gthread_recursive_mutex_timedlock' that depend on a template parameter, so a declaration of '__gthread_recursive_mutex_timedlock' must be availiable [-fpermissive] It seems can not just define _GLIBCXX_HAS_GTHREADS.