| Submitter | Jack Howarth |
|---|---|
| Date | Oct. 7, 2012, 10:28 p.m. |
| Message ID | <20121007222814.GA7531@bromo.med.uc.edu> |
| Download | mbox | patch |
| Permalink | /patch/189868/ |
| State | New |
| Headers | show |
Comments
Patch
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])
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 <howarth@bromo.med.uc.edu> PR libstdc++/54847 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Declare tp as struct for non-POSIX timers. * configure: Regenerated.