From ebc8e66abd969220fe1ee737a174e672888f0e83 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@nokia.com> Date: Tue, 13 Jul 2010 11:24:26 +0200 Subject: [PATCH] Re-enable plain-c++ test. --- tests/manual/manual.pro | 4 +--- tests/manual/plain-cplusplus/Preprocessor.h | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro index 413a76aff8f..0d00d3051a8 100644 --- a/tests/manual/manual.pro +++ b/tests/manual/manual.pro @@ -17,12 +17,10 @@ win { unix { # Uses popen SUBDIRS += \ + plain-cplusplus \ # Profile library paths issues process \ ssh } -# Not compiling, popen + missing includes -# SUBDIRS += plain-cplusplus - subdir_proparser.file=proparser/testreader.pro diff --git a/tests/manual/plain-cplusplus/Preprocessor.h b/tests/manual/plain-cplusplus/Preprocessor.h index 66eceebac72..ed6b8e16b0b 100644 --- a/tests/manual/plain-cplusplus/Preprocessor.h +++ b/tests/manual/plain-cplusplus/Preprocessor.h @@ -33,6 +33,7 @@ #include <iosfwd> #include <vector> #include <map> +#include <cstring> namespace CPlusPlus { @@ -55,7 +56,7 @@ public: : _text(text), _size(size) {} StringRef(const char *text) - : _text(text), _size(strlen(text)) {} + : _text(text), _size(std::strlen(text)) {} inline const char *text() const { return _text; } inline unsigned size() const { return _size; } @@ -66,7 +67,7 @@ public: bool operator == (const StringRef &other) const { if (_size == other._size) - return _text == other._text || ! strncmp(_text, other._text, _size); + return _text == other._text || ! std::strncmp(_text, other._text, _size); return false; } -- GitLab