From e88ff75ef21222c184bd9ed2679cdcbb710914d5 Mon Sep 17 00:00:00 2001 From: Juergen Lock Date: Sat, 25 Jun 2011 18:34:33 +0000 Subject: - Actually fix cxxtools build with clang, the previous update only silenced the warning with clang 2.9 but still generated broken code. - Bump PORTREVISION for devel/cxxtools and also for www/tntnet that depends on cxxtools. --- devel/cxxtools/Makefile | 1 + devel/cxxtools/files/patch-clang | 36 ++++++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) (limited to 'devel/cxxtools') diff --git a/devel/cxxtools/Makefile b/devel/cxxtools/Makefile index e868d495499d..72e52984cc5e 100644 --- a/devel/cxxtools/Makefile +++ b/devel/cxxtools/Makefile @@ -7,6 +7,7 @@ PORTNAME= cxxtools PORTVERSION= 2.0 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://www.tntnet.org/download/ diff --git a/devel/cxxtools/files/patch-clang b/devel/cxxtools/files/patch-clang index 7781b7bce960..83334f2b4701 100644 --- a/devel/cxxtools/files/patch-clang +++ b/devel/cxxtools/files/patch-clang @@ -117,12 +117,32 @@ { } /// returns the parent-object -@@ -339,7 +339,7 @@ class QueryParams +@@ -332,8 +332,15 @@ class QueryParams + // + + /// get named parameter. ++#if 0 // XXX this will return a temporary object for def with clang + const string& param(const string& name, size_type n = 0, + const string& def = std::string()) const ++#else ++ static const std::string emptystring; ++ ++ const string& param(const string& name, size_type n = 0, ++ const string& def = emptystring) const ++#endif + { + named_params_type::const_iterator i = named_params.find(name); if (i != named_params.end() && n < i->second.size()) - return i->second[n]; - else if (!useParentValues()) -- return def; -+ return std::string(def); - else - { - if (i != named_params.end()) +--- a/src/query_params.cpp ++++ b/src/query_params.cpp +@@ -164,6 +164,10 @@ void _parse_url( + } + } + ++#if 1 // XXX clang problem, see query_params.h ++const std::string QueryParams::emptystring; ++#endif ++ + void QueryParams::parse_url(const std::string& url) + { + _parse_url(url.begin(), url.end(), unnamed_params, named_params); -- cgit v1.2.3