http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54847



--- Comment #29 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-08 
14:32:42 UTC ---

(In reply to comment #28)

> It seems like there is only two possible patches here using the existing

> infrastructure in acinclude.m4 that would allow darwin's nanosleep() to be

> found when passing --enable-libstdcxx-time=yes. Either...

> 

> Index: acinclude.m4

> ===================================================================

> --- acinclude.m4    (revision 192206)

> +++ acinclude.m4    (working copy)

> @@ -1249,7 +1249,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME]

>      [#include <unistd.h>

>       #include <time.h>

>      ],

> -    [#if _POSIX_TIMERS > 0

> +    [#if _POSIX_TIMERS != 0



This is just wrong.



See

http://pubs.opengroup.org/onlinepubs/009695399/basedefs/unistd.h.html#tag_13_80_03_02

for the meaning of the values.



_POSIX_TIMERS=200112L would mean darwin provides a pre-2008 nanosleep, -1 means

the Timers option is not supported.



> Or are you going to demand that the use of pre-2008 POSIX nanosleep() be only

> accepted on a target-specific basis?



There are plenty of systems with a 2001 nanosleep that define _POSIX_TIMERS to

20112L, but darwin seems to support nanosleep without the rest of the Timers

option.  I don't want to remove the correct check for _POSIX_TIMERS just for

one system's peculiarities.

Reply via email to