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 function 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 17:03:39 +0000
- Subject: [Bug libstdc++/54847] --enable-libstdcxx-time=yes doesn't find the function 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 #38 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-08 17:03:39 UTC ---
I assume the option of using...
Index: libstdc++-v3/config/os/bsd/darwin/os_defines.h
===================================================================
--- libstdc++-v3/config/os/bsd/darwin/os_defines.h (revision 192213)
+++ libstdc++-v3/config/os/bsd/darwin/os_defines.h (working copy)
@@ -42,4 +42,8 @@
// 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 C++11 standard.
+#define _GLIBCXX_USE_NANOSLEEP 1
+#define _GLIBCXX_USE_SCHED_YIELD 1
+
#endif
...eliminates our ability to toggle this support off with
--disable-libstdcxx-time, right? This is my only concern with this approach
versus the patch in comment 32;