Skip to content
This repository was archived by the owner on Feb 14, 2019. It is now read-only.

Commit 0bc2cfa

Browse files
author
Luca
committed
+ patches from Vincent Untz
1 parent affe28c commit 0bc2cfa

File tree

6 files changed

+24
-4
lines changed

6 files changed

+24
-4
lines changed

CONTRIBUTORS

+4
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@ In no particular order:
4343

4444
* Matthew Wiebe
4545
patch for non-italicized lowercase greek letters in ComputerModernShaper.cc
46+
47+
* Vincent Untz
48+
patch for gcc 4.7 support
49+
patch for missing return in mathmlsvg

mathmlps/main.cc

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
#include <cassert>
2626
#include <cstring>
2727
#include <fstream>
28+
#ifdef __linux__
29+
/* to get getopt on Linux */
30+
#ifndef __USE_POSIX2
31+
#define __USE_POSIX2
32+
#endif
33+
#endif
34+
#include <unistd.h>
2835

2936
#include <popt.h>
3037

mathmlsvg/SMS.cc

+1
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ SMS::fun_depart(const HandlerArgs& args) const
708708
if (asLocation(args[0], loc1) && asLocation(args[1], loc2))
709709
// delete "return 0" and insert here the code
710710
return 0;
711+
return 0;
711712
}
712713

713714
SmartPtr<Value>

mathmlsvg/main.cc

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
#include <cassert>
2626
#include <cstring>
2727
#include <fstream>
28+
#ifdef __linux__
29+
/* to get getopt on Linux */
30+
#ifndef __USE_POSIX2
31+
#define __USE_POSIX2
32+
#endif
33+
#endif
34+
#include <unistd.h>
2835

2936
#include <popt.h>
3037

src/frontend/common/TemplateBuilder.hh

+4-3
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ protected:
5151
SmartPtr<typename ElementBuilder::type>
5252
getElement(const typename Model::Element& el) const
5353
{
54-
if (SmartPtr<typename ElementBuilder::type> elem = smart_cast<typename ElementBuilder::type>(linkerAssoc(el)))
54+
SmartPtr<typename ElementBuilder::type> elem;
55+
if (elem = smart_cast<typename ElementBuilder::type>(this->linkerAssoc(el)))
5556
return elem;
5657
else
5758
{
58-
SmartPtr<typename ElementBuilder::type> elem = ElementBuilder::type::create(ElementBuilder::getContext(*this));
59-
linkerAdd(el, elem);
59+
elem = ElementBuilder::type::create(ElementBuilder::getContext(*this));
60+
this->linkerAdd(el, elem);
6061
return elem;
6162
}
6263
}

src/frontend/common/TemplateElementIterator.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected:
4747
findValidNodeForward(const typename Model::Node& p0) const
4848
{
4949
for (typename Model::Node p = p0; p; p = Model::getNextSibling(p))
50-
if (valid(p)) return Model::asElement(p);
50+
if (this->valid(p)) return Model::asElement(p);
5151
return typename Model::Element();
5252
}
5353

0 commit comments

Comments
 (0)