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 15:31:30 +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 #32 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-08 15:31:30 UTC ---
Would something simple like...
Index: acinclude.m4
===================================================================
--- acinclude.m4 (revision 192212)
+++ acinclude.m4 (working copy)
@@ -1236,7 +1236,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME]
[#include <unistd.h>
#include <time.h>
],
- [#if _POSIX_TIMERS > 0
+ [#if (_POSIX_TIMERS > 0 || defined(__APPLE__))
timespec tp;
#endif
clock_gettime(CLOCK_REALTIME, &tp);
be acceptable? We have the options of __APPLE_CC__, __APPLE__ or __MACH__ from
the preprocessor defines emitted by FSF gcc trunk on darwin.