summaryrefslogtreecommitdiff
path: root/devel/cxxtools/files/patch-clang
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2011-06-25 18:34:33 +0000
committerJuergen Lock <nox@FreeBSD.org>2011-06-25 18:34:33 +0000
commite88ff75ef21222c184bd9ed2679cdcbb710914d5 (patch)
treed1a0fef022e6b91a326eb83ce0af751db71b7627 /devel/cxxtools/files/patch-clang
parentlimit to 1.4.x series (diff)
- 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.
Notes
Notes: svn path=/head/; revision=276376
Diffstat (limited to 'devel/cxxtools/files/patch-clang')
-rw-r--r--devel/cxxtools/files/patch-clang36
1 files changed, 28 insertions, 8 deletions
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);