From 122ce52e8f4f1a7654e0e2f80081487e23af42ce Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 13 Jun 2021 14:29:01 +0900 Subject: [PATCH] Check if alternative malloc header can work in C++ jemalloc (5.2.1 at least) cannot compile in C++ on macOS SDK, due to conflicts on exception specification. --- ext/-test-/cxxanyargs/extconf.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/-test-/cxxanyargs/extconf.rb b/ext/-test-/cxxanyargs/extconf.rb index d1d2469209..9749f42068 100644 --- a/ext/-test-/cxxanyargs/extconf.rb +++ b/ext/-test-/cxxanyargs/extconf.rb @@ -12,6 +12,10 @@ cxx.instance_variable_set(:'@have_devel', true) ok = cxx.try_link(<<~'begin', "") do |x| #include "ruby/config.h" + #ifdef RUBY_ALTERNATIVE_MALLOC_HEADER + # include RUBY_ALTERNATIVE_MALLOC_HEADER + #endif + namespace { typedef int conftest1[SIZEOF_LONG == sizeof(long) ? 1 : -1]; typedef int conftest2[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];