Ganael Laplanche: fix include dependencies for FreeBSD support

This commit is contained in:
ThorstenB 2012-05-04 23:24:10 +02:00
parent 067ff4f8ed
commit 6e662fe4d6
3 changed files with 6 additions and 4 deletions

View File

@ -42,6 +42,7 @@
#include <boost/foreach.hpp>
#include <cstring>
#include <cstdlib>
#include <iostream>
using std::string;

View File

@ -297,19 +297,19 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode * right, const S
}
case props::INT:
return doComp<int>(left->getIntValue(), right->getIntValue(),
precision ? abs(precision->getIntValue()/2) : 0 );
precision ? std::abs(precision->getIntValue()/2) : 0 );
case props::LONG:
return doComp<long>(left->getLongValue(), right->getLongValue(),
precision ? abs(precision->getLongValue()/2L) : 0L );
precision ? std::abs(precision->getLongValue()/2L) : 0L );
case props::FLOAT:
return doComp<float>(left->getFloatValue(), right->getFloatValue(),
precision ? fabs(precision->getFloatValue()/2.0f) : 0.0f );
precision ? std::fabs(precision->getFloatValue()/2.0f) : 0.0f );
case props::DOUBLE:
return doComp<double>(left->getDoubleValue(), right->getDoubleValue(),
precision ? fabs(precision->getDoubleValue()/2.0) : 0.0 );
precision ? std::fabs(precision->getDoubleValue()/2.0) : 0.0 );
case props::STRING:
case props::NONE:

View File

@ -12,6 +12,7 @@
#include <iostream>
#include <cassert>
#include <cstdlib>
#include <cstring>
// working around MSVC weirdness with props.hxx and SGMathFwd