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 non-functional 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: Sun, 07 Oct 2012 20:10:33 +0000
- Subject: [Bug libstdc++/54847] --enable-libstdcxx-time=yes non-functional 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 #11 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-07 20:10:33 UTC ---
The manual change applied to configure works and the build ends up with...
#define _GLIBCXX_USE_NANOSLEEP 1
...in include/x86_64-apple-darwin12.2.0/bits/c++config.h. So we should be able
to fix this with...
Index: libstdc++-v3/acinclude.m4
===================================================================
--- libstdc++-v3/acinclude.m4 (revision 192186)
+++ libstdc++-v3/acinclude.m4 (working copy)
@@ -1251,6 +1251,8 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME]
],
[#if _POSIX_TIMERS > 0
timespec tp;
+ #else
+ struct timespec tp;
#endif
nanosleep(&tp, 0);
], [ac_has_nanosleep=yes], [ac_has_nanosleep=no])