From: Ivan Maidanski Date: Tue, 9 Jul 2019 08:41:18 +0000 (+0300) Subject: Fix test_cpp fail when gc_cpp resides in a dll (Borland, Watcom) X-Git-Tag: upstream/8.0.4~157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06d6903971d50959387d1b2ff21045acc285c6d9;p=platform%2Fupstream%2Flibgc.git Fix test_cpp fail when gc_cpp resides in a dll (Borland, Watcom) * include/gc_cpp.h [(__BORLANDC__ || __WATCOMC__) && !GC_BUILD && !GC_NOT_DLL && GC_OPERATOR_NEW_ARRAY] (new[], delete[]): Define inline operator. * include/gc_cpp.h [(__BORLANDC__ || __WATCOMC__) && !GC_BUILD && !GC_NOT_DLL] (new, delete): Likewise. --- diff --git a/include/gc_cpp.h b/include/gc_cpp.h index ce8354d..a199318 100644 --- a/include/gc_cpp.h +++ b/include/gc_cpp.h @@ -307,8 +307,10 @@ inline void* operator new(size_t size, GC_NS_QUALIFY(GCPlacement) gcp, #endif #if defined(_MSC_VER) || defined(__DMC__) \ - || ((defined(__CYGWIN32__) || defined(__CYGWIN__) \ - || defined(__MINGW32__)) && !defined(GC_BUILD) && !defined(GC_NOT_DLL)) + || ((defined(__BORLANDC__) || defined(__CYGWIN__) \ + || defined(__CYGWIN32__) || defined(__MINGW32__) \ + || defined(__WATCOMC__)) \ + && !defined(GC_BUILD) && !defined(GC_NOT_DLL)) // The following ensures that the system default operator new[] does not // get undefined, which is what seems to happen on VC++ 6 for some reason // if we define a multi-argument operator new[].