From: Ivan Maidanski Date: Tue, 29 May 2018 18:01:23 +0000 (+0300) Subject: Make subthreadcreate test compilable even without libatomic_ops X-Git-Tag: v8.0.0~155 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9aa12ac46fd2369acfc9c8122b571f07c0b3f35;p=gc Make subthreadcreate test compilable even without libatomic_ops (fix of commit 4becbc906) * tests/subthread_create.c [HAVE_CONFIG_H]: Update comment. * tests/subthread_create.c: Do not include gc.h and gc_atomic_ops.h (and do not define AO_REQUIRE_CAS) unless GC_THREADS is defined. --- diff --git a/tests/subthread_create.c b/tests/subthread_create.c index 5d9c831d..7c9a3cce 100644 --- a/tests/subthread_create.c +++ b/tests/subthread_create.c @@ -1,18 +1,17 @@ #ifdef HAVE_CONFIG_H - /* For PARALLEL_MARK */ + /* For GC_THREADS and PARALLEL_MARK */ # include "config.h" #endif -#ifndef GC_THREADS -# define GC_THREADS -#endif -#include "gc.h" +#ifdef GC_THREADS +# include "gc.h" -#ifdef PARALLEL_MARK -# define AO_REQUIRE_CAS -#endif -#include "private/gc_atomic_ops.h" +# ifdef PARALLEL_MARK +# define AO_REQUIRE_CAS +# endif +# include "private/gc_atomic_ops.h" +#endif /* GC_THREADS */ #include