* include/parallel/compatibility.h. Use POSIX sched_yield on
__CYGWIN__
(Sleep): Add prototype for __MINGW32__.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129219
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-10-11 Danny Smith <dannysmith@users.sourceforge.net>
+
+ PR libstdc++/33578
+ * include/parallel/compatibility.h. Use POSIX sched_yield on
+ __CYGWIN__
+ (Sleep): Add prototype for __MINGW32__.
+
2007-10-10 Jason Merrill <jason@redhat.com>
* libsupc++/guard.cc (struct mutex_wrapper): Move into
#include <sys/atomic.h>
#endif
-#if !defined(_WIN32)
+#if !defined(_WIN32) || defined (__CYGWIN__)
#include <sched.h>
#endif
#undef min
#endif
+#ifdef __MINGW32__
+// Including <windows.h> will drag in all the windows32 names. Since
+// that can cause user code portability problems, we just declare the
+// one needed function here.
+extern "C"
+__attribute((dllimport)) void __attribute__((stdcall)) Sleep (unsigned long);
+#endif
+
namespace __gnu_parallel
{
#if defined(__ICC)
inline void
yield()
{
-#ifdef _WIN32
+#if defined (_WIN32) && !defined (__CYGWIN__)
Sleep(0);
#else
sched_yield();