* win32_threads.c (CreateThread, ExitThread, _beginthreadex,
_endthreadex): Undefine unconditionally (because the original function
might be used even for GC_PTHREADS targets).
* win32_threads.c (GC_beginthreadex, GC_endthreadex): Do not define
on Cygwin because the latter does not provide _beginthreadex and
_endthreadex.
GC_INNER unsigned long GC_lock_holder = NO_THREAD;
#endif
+#undef CreateThread
+#undef ExitThread
+#undef _beginthreadex
+#undef _endthreadex
+
#ifdef GC_PTHREADS
# include <errno.h> /* for EAGAIN */
#else
-# undef CreateThread
-# undef ExitThread
-# undef _beginthreadex
-# undef _endthreadex
-
# ifdef MSWINCE
/* Force DONT_USE_SIGNALANDWAIT implementation of PARALLEL_MARK */
/* for WinCE (since Win32 SignalObjectAndWait() is missing). */
ExitThread(dwExitCode);
}
-# ifndef MSWINCE
+# if !defined(MSWINCE) && !defined(CYGWIN32)
GC_API GC_uintptr_t GC_CALL GC_beginthreadex(
void *security, unsigned stack_size,
_endthreadex(retval);
}
-# endif /* !MSWINCE */
+# endif /* !MSWINCE && !CYGWIN32 */
#ifdef GC_WINMAIN_REDIRECT
/* This might be useful on WinCE. Shouldn't be used with GC_DLL. */