[Bug libstdc++/54847] --enable-libstdcxx-time=yes doesn't find the functional nanosleep() on darwin
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 8 16:03:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54847
--- Comment #34 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-08 16:03:10 UTC ---
(In reply to comment #32)
> 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.
You might as well just #define _GLIBCXX_USE_NANOSLEEP in
config/os/bsd/darwin/os_defines.h
More information about the Gcc-bugs
mailing list