http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54847
--- Comment #31 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-08 15:14:19 UTC --- (In reply to comment #30) > Can we take a step back and determine what exactly this PR is about? Several > of the comments make incorrect statements about the status quo, so I want to > get the report clear. > > I don't understand comment 1. The struct business is a red-herring and can be ignored. The test case without struct is compiled by g++ fine on darwin. > > Contrary to comment 2, the configure check for sched_yield does *not* check > _POSIX_TIMERS, so sched_yield should be used on darwin when > --enable-libstdcxx-time is used. Is _GLIBCXX_USE_SCHED_YIELD defined on > darwin > when the --enable-libstdcxx-time option is used? I read libstdc++-v3/acinclude.m4 to imply that the check for sched_yield is only used when configure is passed --enable-libstdcxx-time=rt, I didn't bother with that case on darwin because Jeremy said.... CLOCK_REALTIME isn't supported in darwin, so I wouldn't expect it to work unless you had external implementation for the RT POSIX extension. ...off-list. > > That option *doesn't* enable the use of clock_gettime on darwin, because the > function isn't available. That's unavoidable. > > That option does enable checking for nanosleep, but the check fails on darwin > because nanosleep is available but darwin doesn't identify itself as > supporting > the Timers option (presumably because the rest of the option isn't supported.) > > If that's correct, could we change the bug description to be more accurate? Done. Note that the man page for darwin nanosleep() can be found at... https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/nanosleep.2.html and claims... The nanosleep() function conforms to IEEE Std 1003.1b-1993 (``POSIX.1'').