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: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Oct 2012 14:02:46 +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 #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?