113.0-1
[arch-packages.git] / gtkmathview / trunk / gtkmathview-0.8.0-gcc47.patch
blob958617886f109f0cadc2a3397269f50bb8ac6ac7
1 diff -up gtkmathview-0.8.0/mathmlps/main.cc.gcc47 gtkmathview-0.8.0/mathmlps/main.cc
2 --- gtkmathview-0.8.0/mathmlps/main.cc.gcc47 2012-02-27 13:12:01.218602317 -0500
3 +++ gtkmathview-0.8.0/mathmlps/main.cc 2012-02-27 13:12:06.596555579 -0500
4 @@ -21,6 +21,13 @@
5 #include <cstring>
6 #include <cassert>
7 #include <fstream>
8 +#ifdef __linux__
9 +/* to get getopt on Linux */
10 +#ifndef __USE_POSIX2
11 +#define __USE_POSIX2
12 +#endif
13 +#endif
14 +#include <unistd.h>
16 #include <popt.h>
18 diff -up gtkmathview-0.8.0/mathmlsvg/main.cc.gcc47 gtkmathview-0.8.0/mathmlsvg/main.cc
19 --- gtkmathview-0.8.0/mathmlsvg/main.cc.gcc47 2012-02-27 13:10:33.335366105 -0500
20 +++ gtkmathview-0.8.0/mathmlsvg/main.cc 2012-02-27 13:10:33.374365766 -0500
21 @@ -21,6 +21,13 @@
22 #include <cstring>
23 #include <cassert>
24 #include <fstream>
25 +#ifdef __linux__
26 +/* to get getopt on Linux */
27 +#ifndef __USE_POSIX2
28 +#define __USE_POSIX2
29 +#endif
30 +#endif
31 +#include <unistd.h>
33 #include <popt.h>
35 diff -up gtkmathview-0.8.0/src/frontend/common/TemplateBuilder.hh.gcc47 gtkmathview-0.8.0/src/frontend/common/TemplateBuilder.hh
36 --- gtkmathview-0.8.0/src/frontend/common/TemplateBuilder.hh.gcc47 2007-08-17 06:02:34.000000000 -0400
37 +++ gtkmathview-0.8.0/src/frontend/common/TemplateBuilder.hh 2012-02-27 13:10:33.376365750 -0500
38 @@ -47,12 +47,13 @@ protected:
39 SmartPtr<typename ElementBuilder::type>
40 getElement(const typename Model::Element& el) const
42 - if (SmartPtr<typename ElementBuilder::type> elem = smart_cast<typename ElementBuilder::type>(linkerAssoc(el)))
43 + SmartPtr<typename ElementBuilder::type> elem;
44 + if (elem = smart_cast<typename ElementBuilder::type>(this->linkerAssoc(el)))
45 return elem;
46 else
48 - SmartPtr<typename ElementBuilder::type> elem = ElementBuilder::type::create(ElementBuilder::getContext(*this));
49 - linkerAdd(el, elem);
50 + elem = ElementBuilder::type::create(ElementBuilder::getContext(*this));
51 + this->linkerAdd(el, elem);
52 return elem;
55 diff -up gtkmathview-0.8.0/src/frontend/common/TemplateElementIterator.hh.gcc47 gtkmathview-0.8.0/src/frontend/common/TemplateElementIterator.hh
56 --- gtkmathview-0.8.0/src/frontend/common/TemplateElementIterator.hh.gcc47 2007-08-17 06:02:34.000000000 -0400
57 +++ gtkmathview-0.8.0/src/frontend/common/TemplateElementIterator.hh 2012-02-27 13:10:33.377365741 -0500
58 @@ -43,7 +43,7 @@ protected:
59 findValidNodeForward(const typename Model::Node& p0) const
61 for (typename Model::Node p = p0; p; p = Model::getNextSibling(p))
62 - if (valid(p)) return Model::asElement(p);
63 + if (this->valid(p)) return Model::asElement(p);
64 return typename Model::Element();