From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12772 invoked by alias); 8 Oct 2012 16:31:31 -0000 Received: (qmail 12682 invoked by uid 48); 8 Oct 2012 16:31:13 -0000 From: "howarth at nitro dot med.uc.edu" 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:31: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: howarth at nitro dot med.uc.edu 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/msg00705.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54847 --- Comment #35 from Jack Howarth 2012-10-08 16:31:11 UTC --- (In reply to comment #33) > The problem isn't finding nanosleep, it's finding what version of POSIX or > X/Open or SUS is supported, so we know what the correct feature test macros is > for nanosleep. > > Is _XOPEN_REALTIME defined? If so, to what value? > What about _XOPEN_VERSION and _POSIX_C_VERSION? > > Maybe we can find some other combination of feature test macros that indicate > the POSIX Realtime extensions (POSIX.1b) are supported. On darwin12, unistd.h shows... #define _XOPEN_VERSION 600 /* [XSI] */ #if __DARWIN_C_LEVEL >= 199506L /* This really should be XSI */ ... #define _XOPEN_REALTIME (-1) /* no q'ed signals, mq_* */ #define _XOPEN_REALTIME_THREADS (-1) /* no posix_spawn, et. al. */ ... #endif /* XSI */ #if __DARWIN_C_LEVEL >= 199506L /* Really XSI */ ... #define _SC_XOPEN_REALTIME 111 /* Issue 6 */ #define _SC_XOPEN_REALTIME_THREADS 112 /* Issue 6 */ ... #define _SC_XOPEN_VERSION 116 .... #endif /* XSI */ /* _POSIX_VERSION and _POSIX2_VERSION from sys/unistd.h */ while sys/unistd.h doesn't have _POSIX_C_VERSION but it does have #define _POSIX_VERSION 200112L #define _POSIX2_VERSION 200112L