From c63e3cc657d291d948d0b281533afdb80dca4a6b Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Sun, 19 Jul 2015 03:43:10 -0400 Subject: [PATCH] Fix MSVC build inconsistent linkage in gc functions due to moving the extern "C", and different spelling of _Static_assert --- src/gc.c | 8 ++++---- src/jl_uv.c | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gc.c b/src/gc.c index d9bc14065c2bd..f0ea642b0a924 100644 --- a/src/gc.c +++ b/src/gc.c @@ -28,6 +28,10 @@ #endif #endif +#ifdef __cplusplus +extern "C" { +#endif + // manipulating mark bits #define GC_CLEAN 0 // freshly allocated @@ -252,10 +256,6 @@ static void post_mark(arraylist_t *list, int dryrun); #include "gc-debug.c" -#ifdef __cplusplus -extern "C" { -#endif - int jl_in_gc; // referenced from switchto task.c // malloc wrappers, aligned allocation diff --git a/src/jl_uv.c b/src/jl_uv.c index f6f66e88bea0d..c8e2661a5527e 100644 --- a/src/jl_uv.c +++ b/src/jl_uv.c @@ -27,6 +27,9 @@ #include #define write _write #endif +#if defined(_COMPILER_MICROSOFT_) && !defined(_Static_assert) +#define _Static_assert static_assert +#endif #ifdef __cplusplus #include