The --enable-libstdcxx-time=yes configure option fails to validate the
presence of a usable nanosleep() call on darwin. The fix is the trivial 
change to the test used so that tp is declared as a struct for _POSIX_TIMERS <= 
0.
Regression tested on x86_64-apple-darwin12. Okay for gcc trunk as well as
gcc-4_7-branch/gcc-4_6-branch/gcc-4_5-branch?
                Jack

libstdc++-v3/

2012-10-07  Jack Howarth  <howa...@bromo.med.uc.edu>

        PR libstdc++/54847
        * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Declare tp as struct 
for non-POSIX timers.
        * configure: Regenerated.

Index: acinclude.m4
===================================================================
--- acinclude.m4        (revision 192186)
+++ acinclude.m4        (working copy)
@@ -1251,6 +1251,8 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME]
        ],
        [#if _POSIX_TIMERS > 0
          timespec tp;
+        #else
+         struct timespec tp;
         #endif
          nanosleep(&tp, 0);
        ], [ac_has_nanosleep=yes], [ac_has_nanosleep=no])

Reply via email to