From 803f7ed4bb05d8f79114e0e5f148e70c0a9dd3c7 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 4 Nov 2019 10:47:45 +0300 Subject: Move GC_throw_bad_alloc definition to new C++ file Issue #268 (bdgwc). * CMakeLists.txt [enable_cplusplus] (gccpp): Add gc_badalc.cc library source file. * Makefile.am [CPLUSPLUS] (libgccpp_la_SOURCES): Likewise. * Makefile.am (EXTRA_DIST): Add gc_badalc.cpp. * Makefile.direct (SRCS): Add gc_badalc.cc. * Makefile.direct (gc_badalc.o): New target. * NT_MAKEFILE (gc_badalc.obj): Likewise. * WCC_MAKEFILE (gc_badalc.obj): Likewise. * digimars.mak (gc_badalc.obj): Likewise. * build/s60v3/libgc.mmp (SOURCE): Mention gc_badalc.cpp (commented out). * Makefile.direct (c++): Add dependency on gc_badalc.o; pass gc_badalc.o to ru tool. * NT_MAKEFILE (gccpp.lib): Add dependency on gc_badalc.obj; pass gc_badalc.obj to lib or link tool. * WCC_MAKEFILE (gccpp.lib, gccpp.dll): Likewise. * digimars.mak (OBJS): Add gc_badalc.obj. * doc/README.Mac (Files to build the GC libraries): Add gc_badalc.cc. * doc/gcinterface.md (C++ Interface): Mention gc_badalc.cc file. * gc_badalc.cc: New file. * gc_badalc.cpp: Likewise. * gc_cpp.cc (GC_throw_bad_alloc): Move to gc_badalc.cc. * gc_cpp.cc (GC_ALLOCATOR_THROW_OR_ABORT): Add comment; do not define unless GC_NO_INLINE_STD_NEW, or not _MSC_VER and not __DMC__. * tests/tests.am [CPLUSPLUS && AVOID_CPP_LIB] (test_cpp_LDADD): Add gc_badalc.o. --- Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index a927851b..14405162 100644 --- a/Makefile.am +++ b/Makefile.am @@ -135,7 +135,7 @@ if CPLUSPLUS lib_LTLIBRARIES += libgccpp.la pkginclude_HEADERS += include/gc_allocator.h include/gc_cpp.h include_HEADERS += include/extra/gc_cpp.h -libgccpp_la_SOURCES = gc_cpp.cc +libgccpp_la_SOURCES = gc_badalc.cc gc_cpp.cc libgccpp_la_LIBADD = ./libgc.la libgccpp_la_LDFLAGS = -version-info $(LIBGCCPP_VER_INFO) -no-undefined endif @@ -143,7 +143,7 @@ endif ## FIXME: If Visual C++ users use Makefile.am, this should go into ## pkginclude_HEADERS with proper AM_CONDITIONALization. Otherwise ## delete this comment. -EXTRA_DIST += gc_cpp.cpp +EXTRA_DIST += gc_badalc.cpp gc_cpp.cpp # Misc -- cgit v1.2.1