summaryrefslogtreecommitdiff
path: root/external/cppunit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-22 14:28:20 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-22 14:33:31 +0200
commit77ad60af119ab23a0bfadb3e5a0c4433fe97835b (patch)
treee0089227aaaa8dd60fa264ba9afac25f4fb1a532 /external/cppunit
parentec46bb9ff8d165ab7f4537e305f8d0dae707fcf8 (diff)
Adapt CppUnit to our CPPUNIT_PLUGIN_EXPORT
...which mentions extern "C", so CppUnit's TestPlugInSignature must reflect that. It is a bit odd how CPPUNIT_PLUGIN_EXPORT needs to be passed into CppUnit, so probably best to keep this as a local patch for now. (Clang's -fsanitize=undefined complained about the mismatch.) Change-Id: Ied179a1afe82ceb04de4739c14cf8fadff31b80f
Diffstat (limited to 'external/cppunit')
-rw-r--r--external/cppunit/CPPUNIT_PLUGIN_EXPORT.patch.011
-rw-r--r--external/cppunit/UnpackedTarball_cppunit.mk1
2 files changed, 12 insertions, 0 deletions
diff --git a/external/cppunit/CPPUNIT_PLUGIN_EXPORT.patch.0 b/external/cppunit/CPPUNIT_PLUGIN_EXPORT.patch.0
new file mode 100644
index 000000000000..a764be95a895
--- /dev/null
+++ b/external/cppunit/CPPUNIT_PLUGIN_EXPORT.patch.0
@@ -0,0 +1,11 @@
+--- include/cppunit/plugin/TestPlugIn.h
++++ include/cppunit/plugin/TestPlugIn.h
+@@ -111,7 +111,7 @@
+ /*! \brief Type of the function exported by a plug-in.
+ * \ingroup WritingTestPlugIn
+ */
+-typedef CppUnitTestPlugIn *(*TestPlugInSignature)();
++extern "C" { typedef CppUnitTestPlugIn *(*TestPlugInSignature)(); }
+
+
+ /*! \brief Implements the function exported by the test plug-in
diff --git a/external/cppunit/UnpackedTarball_cppunit.mk b/external/cppunit/UnpackedTarball_cppunit.mk
index 86dc77d4149d..a46e9bf6b3b2 100644
--- a/external/cppunit/UnpackedTarball_cppunit.mk
+++ b/external/cppunit/UnpackedTarball_cppunit.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
external/cppunit/windows.patch \
external/cppunit/unix.patch \
external/cppunit/wundef.patch \
+ external/cppunit/CPPUNIT_PLUGIN_EXPORT.patch.0 \
))
ifeq ($(DISABLE_DYNLOADING),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,cppunit,\