This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/54847] --enable-libstdcxx-time=yes doesn't find the functional nanosleep() on darwin
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Oct 2012 16:31:11 +0000
- Subject: [Bug libstdc++/54847] --enable-libstdcxx-time=yes doesn't find the functional nanosleep() on darwin
- Auto-submitted: auto-generated
- References: <bug-54847-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54847
--- Comment #35 from Jack Howarth <howarth at nitro dot med.uc.edu> 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