Updates to support sgi's MIPSpro compiler version 7.4 and newer. This also fixes a number of C++ issues where FlightGear didn't follow the standard.

This commit is contained in:
ehofman
2003-12-26 13:55:09 +00:00
parent 5aac63d9f5
commit e54cfc002b
37 changed files with 72 additions and 45 deletions
+20 -1
View File
@@ -47,8 +47,25 @@ case "${host}" in
if test "x$CXX" = "xCC" -o "x$CXX" = "xccache CC"; then if test "x$CXX" = "xCC" -o "x$CXX" = "xccache CC"; then
AR="$CXX -ar" AR="$CXX -ar"
ARFLAGS="-o" ARFLAGS="-o"
CXXFLAGS="$CXXFLAGS -I$(top_srcdir)/simgear/compatibility" CXXFLAGS="$CXXFLAGS -I$(top_srcdir)/simgear/compatibility/MIPSpro740"
compatibility_DIR="compatibility" compatibility_DIR="compatibility"
MIPSpro_DIRS="MIPSpro740"
AC_MSG_CHECKING([for MIPSpro compiler version 7.4 or newer])
AC_TRY_RUN([
int main() {
if ( _COMPILER_VERSION < 740 ) {
return -1;
}
return 0;
}
], AC_MSG_RESULT(yes),
[ AC_MSG_RESULT(no)
CXXFLAGS="$CXXFLAGS -I$(top_srcdir)/simgear/compatibility/MIPSpro721"
MIPSpro_DIRS="$(MIPSpro_DIRS) MIPSpro721"
AC_MSG_WARN([Using our own subset of the STL headers])
], AC_MSG_RESULT(yes))
AC_SUBST(MIPSpro_DIRS)
fi fi
;; ;;
*) *)
@@ -348,6 +365,8 @@ AC_CONFIG_FILES([ \
simgear/Makefile \ simgear/Makefile \
simgear/version.h \ simgear/version.h \
simgear/compatibility/Makefile \ simgear/compatibility/Makefile \
simgear/compatibility/MIPSpro721/Makefile \
simgear/compatibility/MIPSpro740/Makefile \
simgear/bucket/Makefile \ simgear/bucket/Makefile \
simgear/debug/Makefile \ simgear/debug/Makefile \
simgear/ephemeris/Makefile \ simgear/ephemeris/Makefile \
@@ -0,0 +1,2 @@
Makefile
Makefile.in
@@ -0,0 +1,14 @@
includedir = @includedir@/compatibility/
include_HEADERS = \
iostream \
strstream \
sstream \
istream \
fstream \
iterator \
iomanip \
new \
streambuf \
\
irix_string
@@ -0,0 +1,2 @@
Makefile
Makefile.in
@@ -0,0 +1,22 @@
includedir = @includedir@/compatibility
EXTRA_DIST = README
include_HEADERS = \
cfloat \
csetjmp \
cstdio \
cwchar \
cassert \
climits \
csignal \
cstdlib \
cwctype \
cctype \
clocale \
cstdarg \
cstring \
cerrno \
cmath \
cstddef \
ctime
+1 -33
View File
@@ -1,33 +1 @@
includedir = @includedir@/compatibility SUBDIRS = $(MIPSpro_DIRS)
EXTRA_DIST = README
include_HEADERS = \
cfloat \
csetjmp \
cstdio \
cwchar \
iostream \
strstream \
sstream \
cassert \
climits \
csignal \
cstdlib \
cwctype \
istream \
cctype \
clocale \
cstdarg \
cstring \
fstream \
iterator \
cerrno \
cmath \
cstddef \
ctime \
iomanip \
new \
streambuf \
\
irix_string
+6 -6
View File
@@ -71,12 +71,12 @@ public:
// Default values for every type. // Default values for every type.
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
const bool SGRawValue<bool>::DefaultValue = false; template<> const bool SGRawValue<bool>::DefaultValue = false;
const int SGRawValue<int>::DefaultValue = 0; template<> const int SGRawValue<int>::DefaultValue = 0;
const long SGRawValue<long>::DefaultValue = 0L; template<> const long SGRawValue<long>::DefaultValue = 0L;
const float SGRawValue<float>::DefaultValue = 0.0; template<> const float SGRawValue<float>::DefaultValue = 0.0;
const double SGRawValue<double>::DefaultValue = 0.0L; template<> const double SGRawValue<double>::DefaultValue = 0.0L;
const char * const SGRawValue<const char *>::DefaultValue = ""; template<> const char * const SGRawValue<const char *>::DefaultValue = "";
+3 -3
View File
@@ -214,9 +214,9 @@ class SkyBVTree : public SkyBaseBVTree<Object, BoundingVolume>
{ {
public: public:
typedef SkyBaseBVTree<Object, BoundingVolume> BaseTree; typedef SkyBaseBVTree<Object, BoundingVolume> BaseTree;
typedef BaseTree::BV BV; typedef typename SkyBaseBVTree<Object, BoundingVolume>::BV BV;
typedef BaseTree::NodeObject NodeObject; typedef typename BaseTree::NodeObject NodeObject;
typedef BaseTree::Node Node; typedef typename BaseTree::Node Node;
void Clear() void Clear()
{ {
@@ -52,7 +52,7 @@ template<class Object>
class SkyBoundingBoxSplitter class SkyBoundingBoxSplitter
{ {
public: public:
typedef SkyBaseBVTree<Object, SkyMinMaxBox>::NodeObject NodeObjectBox; typedef typename SkyBaseBVTree<Object, SkyMinMaxBox>::NodeObject NodeObjectBox;
//typedef SkyBaseBVTree<Object, SkyBoundingSphere>::NodeObject NodeObjectSphere; //typedef SkyBaseBVTree<Object, SkyBoundingSphere>::NodeObject NodeObjectSphere;
#if _MSC_VER == 1200 #if _MSC_VER == 1200
@@ -183,7 +183,7 @@ class SkyAABBTreeSplitter
{ {
public: public:
typedef SkyMinMaxBox BV; typedef SkyMinMaxBox BV;
typedef SkyBaseBVTree<Object, BV>::NodeObject NodeObject; typedef typename SkyBaseBVTree<Object, BV>::NodeObject NodeObject;
SkyAABBTreeSplitter(const NodeObject* pObjs, unsigned int iNumObjs) : _splitter(pObjs, iNumObjs) {} SkyAABBTreeSplitter(const NodeObject* pObjs, unsigned int iNumObjs) : _splitter(pObjs, iNumObjs) {}