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



--- Comment #28 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-10-08 
14:02:46 UTC ---

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

       timespec tp;

      #endif

       nanosleep(&tp, 0);



or 





Index: acinclude.m4

===================================================================

--- acinclude.m4    (revision 192206)

+++ acinclude.m4    (working copy)

@@ -1249,10 +1249,8 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME]

     [#include <unistd.h>

      #include <time.h>

     ],

-    [#if _POSIX_TIMERS > 0

-      timespec tp;

-     #endif

-      nanosleep(&tp, 0);

+    [timespec tp;

+     nanosleep(&tp, 0);

     ], [ac_has_nanosleep=yes], [ac_has_nanosleep=no])



       AC_MSG_RESULT($ac_has_nanosleep)



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

accepted on a target-specific basis?

Reply via email to