From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22914 invoked by alias); 8 Oct 2012 16:03:31 -0000 Received: (qmail 22818 invoked by uid 48); 8 Oct 2012 16:03:12 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/54847] --enable-libstdcxx-time=yes doesn't find the functional nanosleep() on darwin Date: Mon, 08 Oct 2012 16:03: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: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 2012-10/txt/msg00701.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54847 --- Comment #34 from Jonathan Wakely 2012-10-08 16:03:10 UTC --- (In reply to comment #32) > Would something simple like... > > Index: acinclude.m4 > =================================================================== > --- acinclude.m4 (revision 192212) > +++ acinclude.m4 (working copy) > @@ -1236,7 +1236,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME] > [#include > #include > ], > - [#if _POSIX_TIMERS > 0 > + [#if (_POSIX_TIMERS > 0 || defined(__APPLE__)) > timespec tp; > #endif > clock_gettime(CLOCK_REALTIME, &tp); > > be acceptable? We have the options of __APPLE_CC__, __APPLE__ or __MACH__ from > the preprocessor defines emitted by FSF gcc trunk on darwin. You might as well just #define _GLIBCXX_USE_NANOSLEEP in config/os/bsd/darwin/os_defines.h