Fix test_cpp fail when gc_cpp resides in a dll (Borland, Watcom)
authorIvan Maidanski <ivmai@mail.ru>
Tue, 9 Jul 2019 08:41:18 +0000 (11:41 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 16 Jul 2019 07:20:35 +0000 (10:20 +0300)
* 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.

include/gc_cpp.h

index ce8354d..a199318 100644 (file)
@@ -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[].