From: Matthew Fernandez Date: Sat, 25 Dec 2021 19:05:47 +0000 (-0800) Subject: convert Mingle to C++ X-Git-Tag: 3.0.0~95^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2edc84826f2ddd18c366795668836c584f4b16e7;p=graphviz convert Mingle to C++ cmd/mingle depends on lib/mingle, which in turn depends on libANN, a C++ library. Thus the `mingle` binary needs to link against the C++ standard library. There is no advantage to Mingle being implemented in C, and some nice advantages to it being implemented in C++ instead. This commit does a basic rename, as AFAICT nothing in minglemain.c has varying semantics between C and C++. Future commits will use C++ features to simplify the code. Related to #2154. --- diff --git a/cmd/mingle/Makefile.am b/cmd/mingle/Makefile.am index a2154d39d..d9af2411b 100644 --- a/cmd/mingle/Makefile.am +++ b/cmd/mingle/Makefile.am @@ -25,7 +25,7 @@ else pdf = endif -mingle_SOURCES = minglemain.c +mingle_SOURCES = minglemain.cpp mingle_CPPFLAGS = $(AM_CPPFLAGS) mingle_LDADD = \ $(top_builddir)/lib/mingle/libmingle_C.la \ @@ -39,10 +39,6 @@ mingle_LDADD = \ $(top_builddir)/lib/cdt/libcdt.la \ $(ANN_LIBS) -lm -# add a non-existent C++ source to force the C++ compiler to be used for -# linking, so the C++ standard library is included for our C++ dependencies -nodist_EXTRA_mingle_SOURCES = fake.cxx - if ENABLE_MAN_PDFS if HAVE_PS2PDF mingle.1.pdf: mingle.1.ps diff --git a/cmd/mingle/mingle.vcxproj b/cmd/mingle/mingle.vcxproj index d18e2ecc8..405f9b2f2 100644 --- a/cmd/mingle/mingle.vcxproj +++ b/cmd/mingle/mingle.vcxproj @@ -99,7 +99,7 @@ - + diff --git a/cmd/mingle/mingle.vcxproj.filters b/cmd/mingle/mingle.vcxproj.filters index 9b4a0e6eb..7b875cd82 100644 --- a/cmd/mingle/mingle.vcxproj.filters +++ b/cmd/mingle/mingle.vcxproj.filters @@ -15,7 +15,7 @@ - + Source Files diff --git a/cmd/mingle/minglemain.c b/cmd/mingle/minglemain.cpp similarity index 100% rename from cmd/mingle/minglemain.c rename to cmd/mingle/minglemain.cpp