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: "jeremyhu at macports dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 07 Oct 2012 22:49:50 +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 #14 from Jeremy Huddleston Sequoia <jeremyhu at macports dot org> 2012-10-07 22:49:50 UTC ---
Your patch looks wrong to me. You should just get rid of the '#if
_POSIX_TIMERS > 0' check and always use 'struct timespec' :
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_nanosleep.html
If there are some platforms which don't conform and need 'timespec' instead of
'struct timespec', then you can certainly work around those on a case by case
basis, but the _POSIX_TIMERS conditional has no reason to be there as far as I
can tell...
You should also do something similar for the clock_gettime and sched_yield
checks.