summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2011-05-23 03:00:03 +0000
committerAlexis Ballier <aballier@gentoo.org>2011-05-23 03:00:03 +0000
commitf312a5a5a66a453c1924a291bfa21f97bd2c5f1a (patch)
treeb93a89e645d7ea35194761fef2bb2f0e3b7faa57 /app-office/lyx/files
parentRemove old and insecure versions. (diff)
downloadgentoo-2-f312a5a5a66a453c1924a291bfa21f97bd2c5f1a.tar.gz
gentoo-2-f312a5a5a66a453c1924a291bfa21f97bd2c5f1a.tar.bz2
gentoo-2-f312a5a5a66a453c1924a291bfa21f97bd2c5f1a.zip
fix build with gcc 4.6, bug #367435, by Pavel Sanda
(Portage version: 2.2.0_alpha34/cvs/Linux x86_64)
Diffstat (limited to 'app-office/lyx/files')
-rw-r--r--app-office/lyx/files/1.6.10-gcc.patch142
1 files changed, 142 insertions, 0 deletions
diff --git a/app-office/lyx/files/1.6.10-gcc.patch b/app-office/lyx/files/1.6.10-gcc.patch
new file mode 100644
index 000000000000..44e0fc94627b
--- /dev/null
+++ b/app-office/lyx/files/1.6.10-gcc.patch
@@ -0,0 +1,142 @@
+diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
+index 68cf1d2..16a3c94 100644
+--- a/src/insets/InsetInclude.cpp
++++ b/src/insets/InsetInclude.cpp
+@@ -806,7 +806,7 @@ support::FileNameList const &
+ tmp->setParent(&buffer);
+ return cache;
+ }
+- static support::FileNameList const empty;
++ static support::FileNameList const empty = support::FileNameList();
+ return empty;
+ }
+
+diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
+index 4a267e9..7a165e2 100644
+--- a/src/insets/InsetTabular.cpp
++++ b/src/insets/InsetTabular.cpp
+@@ -188,62 +188,6 @@ TabularFeature tabularFeature[] =
+ };
+
+
+-template <class T>
+-string const write_attribute(string const & name, T const & t)
+-{
+- string const s = tostr(t);
+- return s.empty() ? s : " " + name + "=\"" + s + "\"";
+-}
+-
+-template <>
+-string const write_attribute(string const & name, string const & t)
+-{
+- return t.empty() ? t : " " + name + "=\"" + t + "\"";
+-}
+-
+-
+-template <>
+-string const write_attribute(string const & name, docstring const & t)
+-{
+- return t.empty() ? string() : " " + name + "=\"" + to_utf8(t) + "\"";
+-}
+-
+-
+-template <>
+-string const write_attribute(string const & name, bool const & b)
+-{
+- // we write only true attribute values so we remove a bit of the
+- // file format bloat for tabulars.
+- return b ? write_attribute(name, convert<string>(b)) : string();
+-}
+-
+-
+-template <>
+-string const write_attribute(string const & name, int const & i)
+-{
+- // we write only true attribute values so we remove a bit of the
+- // file format bloat for tabulars.
+- return i ? write_attribute(name, convert<string>(i)) : string();
+-}
+-
+-
+-template <>
+-string const write_attribute(string const & name, Tabular::idx_type const & i)
+-{
+- // we write only true attribute values so we remove a bit of the
+- // file format bloat for tabulars.
+- return i ? write_attribute(name, convert<string>(i)) : string();
+-}
+-
+-
+-template <>
+-string const write_attribute(string const & name, Length const & value)
+-{
+- // we write only the value if we really have one same reson as above.
+- return value.zero() ? string() : write_attribute(name, value.asString());
+-}
+-
+-
+ string const tostr(LyXAlignment const & num)
+ {
+ switch (num) {
+@@ -503,6 +447,61 @@ void l_getline(istream & is, string & str)
+ }
+ }
+
++template <class T>
++string const write_attribute(string const & name, T const & t)
++{
++ string const s = tostr(t);
++ return s.empty() ? s : " " + name + "=\"" + s + "\"";
++}
++
++template <>
++string const write_attribute(string const & name, string const & t)
++{
++ return t.empty() ? t : " " + name + "=\"" + t + "\"";
++}
++
++
++template <>
++string const write_attribute(string const & name, docstring const & t)
++{
++ return t.empty() ? string() : " " + name + "=\"" + to_utf8(t) + "\"";
++}
++
++
++template <>
++string const write_attribute(string const & name, bool const & b)
++{
++ // we write only true attribute values so we remove a bit of the
++ // file format bloat for tabulars.
++ return b ? write_attribute(name, convert<string>(b)) : string();
++}
++
++
++template <>
++string const write_attribute(string const & name, int const & i)
++{
++ // we write only true attribute values so we remove a bit of the
++ // file format bloat for tabulars.
++ return i ? write_attribute(name, convert<string>(i)) : string();
++}
++
++
++template <>
++string const write_attribute(string const & name, Tabular::idx_type const & i)
++{
++ // we write only true attribute values so we remove a bit of the
++ // file format bloat for tabulars.
++ return i ? write_attribute(name, convert<string>(i)) : string();
++}
++
++
++template <>
++string const write_attribute(string const & name, Length const & value)
++{
++ // we write only the value if we really have one same reson as above.
++ return value.zero() ? string() : write_attribute(name, value.asString());
++}
++
+ } // namespace
+
+