summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-22 14:28:20 +0200
committerMichael Stahl <mstahl@redhat.com>2014-05-26 11:42:45 +0200
commit6f1d52af84c91e297933f27eba5b8019d993d707 (patch)
tree80426402c70d6149d12e1acd87b3bcec348f2acd /external
parent9f504936095411fcefdb65b6e09bd557068af20f (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 (cherry picked from commit 77ad60af119ab23a0bfadb3e5a0c4433fe97835b)
Diffstat (limited to 'external')
-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,\