From: Ivan Maidanski Date: Thu, 1 Mar 2018 08:35:41 +0000 (+0300) Subject: Fix linkage of javaxfc.h symbols for the case of compilation as C++ code X-Git-Tag: v8.0.0~313 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f30a26d5e335be3b84920e2b360b4d09ef83e447;p=gc Fix linkage of javaxfc.h symbols for the case of compilation as C++ code Issue #206 (bdwgc). The functions should be declared (as extern "C") before the definition. * finalize.c [!GC_NO_FINALIZATION]: Include javaxfc.h. * pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD]: Likewise. --- diff --git a/finalize.c b/finalize.c index 640ee4e7..6f178b9d 100644 --- a/finalize.c +++ b/finalize.c @@ -17,6 +17,7 @@ #include "private/gc_pmark.h" #ifndef GC_NO_FINALIZATION +# include "javaxfc.h" /* to get GC_finalize_all() as extern "C" */ /* Type of mark procedure used for marking from finalizable object. */ /* This procedure normally does not mark the object, only its */ diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 35ca4b05..938a3847 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -430,6 +430,7 @@ STATIC void GC_restart_handler(int sig) # ifdef GC_ENABLE_SUSPEND_THREAD # include +# include "javaxfc.h" /* to get the prototypes as extern "C" */ STATIC void GC_brief_async_signal_safe_sleep(void) {