win32-pthread
* include/gc.h (GC_CreateThread, GC_ExitThread, GC_uintptr_t,
GC_beginthreadex, GC_endthreadex): Also declare (and redirect) for
GC_PTHREADS during GC build or if the client includes windows.h before
gc.h file; add a comment.
* win32_threads.c (thread_args, GC_win32_start_inner, GC_win32_start,
GC_CreateThread, GC_ExitThread, GC_beginthreadex, GC_endthreadex):
Also define for GC_PTHREADS.
GC_API void GC_CALL GC_register_has_static_roots_callback(
GC_has_static_roots_func);
-#if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
+#if defined(GC_WIN32_THREADS) \
+ && (!defined(GC_PTHREADS) || defined(GC_BUILD) || defined(WINAPI))
+ /* Note: for Cygwin and win32-pthread, this is skipped */
+ /* unless windows.h is included before gc.h. */
# ifndef GC_NO_THREAD_DECLS
#endif /* PARALLEL_MARK */
-#ifndef GC_PTHREADS
-
/* We have no DllMain to take care of new threads. Thus we */
/* must properly intercept thread creation. */
# endif /* !MSWINCE */
-#endif /* !GC_PTHREADS */
-
#ifdef GC_WINMAIN_REDIRECT
/* This might be useful on WinCE. Shouldn't be used with GC_DLL. */