http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54847



--- Comment #43 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-08 
20:31:01 UTC ---

Both OpenBSD and FreeBSD seem to have nanosleep calls documented as...



The nanosleep() function conforms to IEEE Std 1003.1b-1993 (``POSIX'')



like Apple's. On the other hand, using a patch like...



Index: libstdc++-v3/config/os/bsd/darwin/os_defines.h

===================================================================

--- libstdc++-v3/config/os/bsd/darwin/os_defines.h    (revision 192222)

+++ libstdc++-v3/config/os/bsd/darwin/os_defines.h    (working copy)

@@ -42,4 +42,9 @@

 // Static initializer macro is buggy in darwin, see libstdc++/51906

 #define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC



+// Use nanosleep and sched_yield in libc for time.clock and 

+// thread.thread.this in C++11 standard.

+#define _GLIBCXX_USE_NANOSLEEP 1

+#define _GLIBCXX_USE_SCHED_YIELD 1

+

 #endif



will effectively default darwin to --enable-libstdcxx-time=yes and eliminates a

configure option.

Reply via email to