From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9967 invoked by alias); 7 Oct 2012 22:51:08 -0000 Received: (qmail 9396 invoked by uid 48); 7 Oct 2012 22:49:51 -0000 From: "jeremyhu at macports dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/54847] --enable-libstdcxx-time=yes non-functional on darwin Date: Sun, 07 Oct 2012 22:51: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: jeremyhu at macports dot 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/msg00630.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54847 --- Comment #14 from Jeremy Huddleston Sequoia 2012-10-07 22:49:50 UTC --- Your patch looks wrong to me. You should just get rid of the '#if _POSIX_TIMERS > 0' check and always use 'struct timespec' : http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_nanosleep.html If there are some platforms which don't conform and need 'timespec' instead of 'struct timespec', then you can certainly work around those on a case by case basis, but the _POSIX_TIMERS conditional has no reason to be there as far as I can tell... You should also do something similar for the clock_gettime and sched_yield checks.