1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Fix build with gcc46+

Submitted by:	avg
This commit is contained in:
Ganael LAPLANCHE 2012-04-30 13:08:37 +00:00
parent dcb3027451
commit 8b5aa2e687
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=295719
4 changed files with 47 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= simgear
PORTVERSION= 2.6.0
PORTREVISION= 1
CATEGORIES= devel games
MASTER_SITES= http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/ \
ftp://ftp.de.flightgear.org/pub/simgear/Source/ \

View File

@ -0,0 +1,10 @@
--- simgear/misc/sg_dir.cxx.orig 2012-04-28 14:53:45.756237069 +0300
+++ simgear/misc/sg_dir.cxx 2012-04-28 14:54:09.314234598 +0300
@@ -40,6 +40,7 @@
#include <boost/foreach.hpp>
#include <cstring>
+#include <cstdlib>
#include <iostream>
using std::string;

View File

@ -0,0 +1,26 @@
--- simgear/props/condition.cxx.orig 2012-04-28 14:55:45.758238526 +0300
+++ simgear/props/condition.cxx 2012-04-28 14:57:16.771484540 +0300
@@ -297,19 +297,19 @@ doComparison (const SGPropertyNode * lef
}
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

@ -0,0 +1,10 @@
--- simgear/props/propertyObject_test.cxx.orig 2012-04-28 14:58:06.980235592 +0300
+++ simgear/props/propertyObject_test.cxx 2012-04-28 14:59:07.014234574 +0300
@@ -12,6 +12,7 @@
#include <iostream>
#include <cassert>
+#include <cstdlib>
#include <cstring>
// working around MSVC weirdness with props.hxx and SGMathFwd