summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2013-09-20 14:59:45 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2013-09-20 14:59:45 +0000
commit627ff49d6fb3a7e52bb1430c412eee62311b5a2c (patch)
tree62b81f59cd59d3e090d9c94cb1d90418c83d9fb9 /src
parentRefactor status-bar text for multiple items, was very broken (diff)
downloadinkscape-627ff49d6fb3a7e52bb1430c412eee62311b5a2c.tar.gz
inkscape-627ff49d6fb3a7e52bb1430c412eee62311b5a2c.zip
make check: Fix harder. Remove muldefs hack and modify quote-test.h
so that the hack is not required any more. (bzr r12551)
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/xml/quote-test.h5
-rw-r--r--src/xml/quote.cpp12
-rw-r--r--src/xml/quote.h3
4 files changed, 10 insertions, 11 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index a0c857aa3..a45a33932 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -268,7 +268,6 @@ XFAIL_TESTS = $(check_PROGRAMS)
# including the the testsuites here ensures that they get distributed
cxxtests_SOURCES = cxxtests.cpp $(CXXTEST_TESTSUITES) $(ink_common_sources) $(win32_sources)
-cxxtests_LDFLAGS = -z muldefs
cxxtests_LDADD = $(all_libs)
cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE)
diff --git a/src/xml/quote-test.h b/src/xml/quote-test.h
index bd5c1f54c..bc01ec4e9 100644
--- a/src/xml/quote-test.h
+++ b/src/xml/quote-test.h
@@ -7,10 +7,7 @@
#include <cstring>
#include <functional>
-/* mental disclaims all responsibility for this evil idea for testing
- static functions. The main disadvantages are that we retain any
- #define's and `using' directives of the included file. */
-#include "quote.cpp"
+#include "quote.h"
class XmlQuoteTest : public CxxTest::TestSuite
{
diff --git a/src/xml/quote.cpp b/src/xml/quote.cpp
index 030a6c764..c9e001d05 100644
--- a/src/xml/quote.cpp
+++ b/src/xml/quote.cpp
@@ -19,7 +19,7 @@
/** \return strlen(xml_quote_strdup(\a val)) (without doing the malloc).
* \pre val != NULL
*/
-static size_t
+size_t
xml_quoted_strlen(char const *val)
{
size_t ret = 0;
@@ -43,11 +43,11 @@ xml_quoted_strlen(char const *val)
static void
xml_quote(char *dest, char const *src)
{
-#define COPY_LIT(_lit) do { \
- size_t cpylen = sizeof(_lit "") - 1; \
- memcpy(dest, _lit, cpylen); \
- dest += cpylen; \
- } while(0)
+#define COPY_LIT(_lit) do { \
+ size_t cpylen = sizeof(_lit "") - 1; \
+ memcpy(dest, _lit, cpylen); \
+ dest += cpylen; \
+ } while(0)
for (; *src != '\0'; ++src) {
switch (*src) {
diff --git a/src/xml/quote.h b/src/xml/quote.h
index 597272cd3..8e3bca0eb 100644
--- a/src/xml/quote.h
+++ b/src/xml/quote.h
@@ -1,6 +1,9 @@
#ifndef SEEN_XML_QUOTE_H
#define SEEN_XML_QUOTE_H
+#include <stddef.h>
+
+size_t xml_quoted_strlen(char const *val);
char *xml_quote_strdup(char const *src);