From: Ivan Maidanski Date: Sat, 17 Dec 2016 07:11:37 +0000 (+0300) Subject: Fix compilation for winpthreads if HANDLE_FORK X-Git-Tag: v8.0.0~983 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=887dce09cabb172883395b88a31b9cfe98c0fa22;p=gc Fix compilation for winpthreads if HANDLE_FORK * tests/test.c [GC_PTHREADS && !GC_WIN32_PTHREADS] (NO_TEST_HANDLE_FORK): Define. * win32_threads.c [CAN_HANDLE_FORK] (available_markers_m1): Define (as static variable) even if !GC_PTHREADS_PARAMARK. --- diff --git a/tests/test.c b/tests/test.c index f5f04efd..ef70aef6 100644 --- a/tests/test.c +++ b/tests/test.c @@ -84,7 +84,7 @@ # define GC_printf printf # endif -# if defined(GC_PTHREADS) +# if defined(GC_PTHREADS) && !defined(GC_WIN32_PTHREADS) # include # else # define NO_TEST_HANDLE_FORK diff --git a/win32_threads.c b/win32_threads.c index 5ff3c638..1527ba3c 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -1766,7 +1766,9 @@ GC_INNER void GC_get_next_stack(char *start, char *limit, /* GC_mark_threads[] is unused here unlike that in pthread_support.c */ -# ifndef CAN_HANDLE_FORK +# ifdef CAN_HANDLE_FORK + static int available_markers_m1 = 0; +# else # define available_markers_m1 GC_markers_m1 # endif @@ -1780,9 +1782,6 @@ GC_INNER void GC_get_next_stack(char *start, char *limit, /* GC_start_mark_threads is the same as in pthread_support.c except */ /* for thread stack that is assumed to be large enough. */ -# ifdef CAN_HANDLE_FORK - static int available_markers_m1 = 0; -# endif GC_INNER void GC_start_mark_threads_inner(void) {