From 71f08e795dca21cac1293ce89abb62024d4a16cc Mon Sep 17 00:00:00 2001
From: david <david>
Date: Tue, 31 Dec 2002 18:26:02 +0000
Subject: [PATCH] Patches from Erik Hofman for SGI compatibility:

Some more cmall changes to the SimGear header files and removed the
SG_HAVE_NATIVE_SGI_COMPILERS dependancies from FlightGear.

I've added a seperate JSBSim patch for the JSBSim source tree.
---
 src/ATC/ATC.hxx                            |  2 --
 src/ATC/ATCVoice.hxx                       | 10 +---------
 src/ATC/approach.hxx                       |  5 -----
 src/ATC/atis.cxx                           |  2 --
 src/ATC/atis.hxx                           |  8 +-------
 src/ATC/ground.hxx                         |  2 --
 src/ATC/tower.hxx                          |  2 --
 src/Airports/genrunways.cxx                |  2 --
 src/Airports/gensimple.cxx                 |  2 --
 src/Airports/runways.cxx                   |  4 ----
 src/Airports/simple.cxx                    |  4 ----
 src/Cockpit/panel_io.cxx                   |  2 --
 src/Cockpit/panel_io.hxx                   |  2 --
 src/FDM/IO360.cxx                          |  2 --
 src/FDM/IO360.hxx                          |  2 --
 src/FDM/JSBSim/FGColumnVector3.h           | 12 +++++-------
 src/FDM/JSBSim/FGColumnVector4.h           | 12 +++++-------
 src/FDM/JSBSim/FGConfigFile.h              | 16 +++++++---------
 src/FDM/JSBSim/FGMatrix33.h                | 12 +++++-------
 src/FDM/JSBSim/FGTank.h                    |  8 +++-----
 src/FDM/JSBSim/FGfdmSocket.h               |  6 ++----
 src/FDM/LaRCsimIC.cxx                      |  2 --
 src/FDM/UIUCModel/uiuc_1DdataFileReader.h  |  2 --
 src/FDM/UIUCModel/uiuc_2DdataFileReader.h  |  2 --
 src/FDM/UIUCModel/uiuc_aircraft.h          |  2 --
 src/FDM/UIUCModel/uiuc_engine.cpp          |  2 --
 src/FDM/UIUCModel/uiuc_gear.cpp            |  2 --
 src/FDM/UIUCModel/uiuc_menu.cpp            |  5 ++---
 src/FDM/UIUCModel/uiuc_parsefile.h         |  2 --
 src/FDM/UIUCModel/uiuc_recorder.cpp        |  2 --
 src/FDM/UIUCModel/uiuc_warnings_errors.cpp |  5 ++---
 src/FDM/UIUCModel/uiuc_wrapper.cpp         |  2 --
 src/GUI/gui_funcs.cxx                      |  3 ---
 src/GUI/mouse.cxx                          |  3 ---
 src/Input/fgjs.cxx                         |  2 --
 src/Input/input.cxx                        |  2 --
 src/Main/fg_commands.cxx                   |  2 --
 src/Main/fg_props.cxx                      |  2 --
 src/Main/logger.cxx                        |  6 ++----
 src/Main/logger.hxx                        |  8 +++-----
 src/Main/main.cxx                          |  2 --
 src/Model/modelmgr.cxx                     |  2 ++
 src/Navaids/fix.hxx                        |  4 ----
 src/Navaids/ils.hxx                        |  4 ----
 src/Navaids/nav.hxx                        |  4 ----
 src/Network/httpd.cxx                      |  2 --
 src/Network/jpg-httpd.cxx                  |  2 --
 src/Network/props.cxx                      |  2 --
 src/WeatherCM/linintp2.cpp                 |  2 --
 src/WeatherCM/sphrintp.cpp                 |  2 --
 src/WeatherCM/sphrintp.h                   |  2 --
 51 files changed, 40 insertions(+), 161 deletions(-)

diff --git a/src/ATC/ATC.hxx b/src/ATC/ATC.hxx
index 777ccdbd8..143b3080a 100644
--- a/src/ATC/ATC.hxx
+++ b/src/ATC/ATC.hxx
@@ -27,9 +27,7 @@
 #include STL_IOSTREAM
 #include STL_STRING
 
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_STD(ostream);
-#endif
 SG_USING_STD(string);
 
 // Possible types of ATC type that the radios may be tuned to.
diff --git a/src/ATC/ATCVoice.hxx b/src/ATC/ATCVoice.hxx
index 5b61f75c0..8edd8953e 100644
--- a/src/ATC/ATCVoice.hxx
+++ b/src/ATC/ATCVoice.hxx
@@ -23,13 +23,7 @@
 
 #include <simgear/compiler.h>
 
-#ifdef SG_HAVE_STD_INCLUDES
-#  include <fstream>
-#  include <iostream>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <fstream.h>
-#  include <iostream.h>
-#elif defined( __BORLANDC__ ) || (__APPLE__)
+#if defined( SG_HAVE_STD_INCLUDES ) || defined( __BORLANDC__ ) || (__APPLE__)
 #  include <fstream>
 #  include <iostream>
 #else
@@ -45,12 +39,10 @@ SG_USING_STD(map);
 SG_USING_STD(list);
 SG_USING_STD(string);
 
-#if !defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(cout);
 SG_USING_STD(ios);
 SG_USING_STD(ofstream);
 SG_USING_STD(ifstream);
-#endif
 
 
 struct WordData {
diff --git a/src/ATC/approach.hxx b/src/ATC/approach.hxx
index 92b91e40c..0dfe949ae 100644
--- a/src/ATC/approach.hxx
+++ b/src/ATC/approach.hxx
@@ -36,8 +36,6 @@
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
 #include <iomanip>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
 #elif defined( __BORLANDC__ ) || (__APPLE__)
 #  include <iostream>
 #else
@@ -45,10 +43,7 @@
 #include <iomanip.h>
 #endif
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(istream);
-#endif
-
 SG_USING_STD(string);
 
 #include "ATC.hxx"
diff --git a/src/ATC/atis.cxx b/src/ATC/atis.cxx
index 27f2200c4..0aaac233f 100644
--- a/src/ATC/atis.cxx
+++ b/src/ATC/atis.cxx
@@ -32,9 +32,7 @@
 SG_USING_STD(string);
 
 #include STL_IOSTREAM
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);
-#endif
 
 //#include <simgear/debug/logstream.hxx>
 //#include <simgear/misc/sgstream.hxx>
diff --git a/src/ATC/atis.hxx b/src/ATC/atis.hxx
index 2ee92f81e..3ee623573 100644
--- a/src/ATC/atis.hxx
+++ b/src/ATC/atis.hxx
@@ -24,6 +24,7 @@
 #define _FG_ATIS_HXX
 
 #include <stdio.h>
+#include <string>
 
 #include <simgear/compiler.h>
 #include <simgear/math/sg_geodesy.hxx>
@@ -34,8 +35,6 @@
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
 #  include <iomanip>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
 #elif defined( __BORLANDC__ ) || (__APPLE__)
 #  include <iostream>
 #else
@@ -43,12 +42,7 @@
 #  include <iomanip.h>
 #endif
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(istream);
-#endif
-
-#include <string>
-
 SG_USING_STD(string);
 
 #include "ATC.hxx"
diff --git a/src/ATC/ground.hxx b/src/ATC/ground.hxx
index 924601faa..236370997 100644
--- a/src/ATC/ground.hxx
+++ b/src/ATC/ground.hxx
@@ -25,9 +25,7 @@
 #include STL_STRING
 
 SG_USING_STD(string);
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_STD(ios);
-#endif
 
 #include <map>
 #include <vector>
diff --git a/src/ATC/tower.hxx b/src/ATC/tower.hxx
index a73a4ebeb..8b38f371a 100644
--- a/src/ATC/tower.hxx
+++ b/src/ATC/tower.hxx
@@ -31,9 +31,7 @@
 #include STL_STRING
 
 SG_USING_STD(string);
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_STD(ios);
-#endif
 
 #include "ATC.hxx"
 //#include "ATCmgr.hxx"
diff --git a/src/Airports/genrunways.cxx b/src/Airports/genrunways.cxx
index 869e9bb64..f3b4c4709 100644
--- a/src/Airports/genrunways.cxx
+++ b/src/Airports/genrunways.cxx
@@ -8,10 +8,8 @@
 
 #include "runways.hxx"
 
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);
 SG_USING_STD(endl);
-#endif
 
 int main( int argc, char **argv ) {
     FGRunwaysUtil runways;
diff --git a/src/Airports/gensimple.cxx b/src/Airports/gensimple.cxx
index 29db04eb3..0d9f60850 100644
--- a/src/Airports/gensimple.cxx
+++ b/src/Airports/gensimple.cxx
@@ -8,10 +8,8 @@
 
 #include "simple.hxx"
 
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);
 SG_USING_STD(endl);
-#endif
 
 int main( int argc, char **argv ) {
     FGAirportsUtil airports;
diff --git a/src/Airports/runways.cxx b/src/Airports/runways.cxx
index 3d16a3dd9..481f00c95 100644
--- a/src/Airports/runways.cxx
+++ b/src/Airports/runways.cxx
@@ -54,17 +54,13 @@ SG_USING_NAMESPACE(std);
 
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
 #elif defined( __BORLANDC__ ) || defined (__APPLE__)
 #  include <iostream>
 #else
 #  include <istream.h>
 #endif
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(istream);
-#endif
 
 inline istream&
 operator >> ( istream& in, FGRunway& a )
diff --git a/src/Airports/simple.cxx b/src/Airports/simple.cxx
index 4d74af4b4..ba19df66a 100644
--- a/src/Airports/simple.cxx
+++ b/src/Airports/simple.cxx
@@ -51,16 +51,12 @@ SG_USING_NAMESPACE(std);
 
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
 #elif defined( __BORLANDC__ ) || defined (__APPLE__)
 #  include <iostream>
 #else
 #  include <istream.h>
 #endif
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(istream);
-#endif
 
 
 inline istream&
diff --git a/src/Cockpit/panel_io.cxx b/src/Cockpit/panel_io.cxx
index fa7bf18f0..474ed4aa4 100644
--- a/src/Cockpit/panel_io.cxx
+++ b/src/Cockpit/panel_io.cxx
@@ -50,10 +50,8 @@
 //built-in layers
 #include "built_in/FGMagRibbon.hxx"
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(istream);
 SG_USING_STD(ifstream);
-#endif
 SG_USING_STD(string);
 
 
diff --git a/src/Cockpit/panel_io.hxx b/src/Cockpit/panel_io.hxx
index 6aea75e23..ab5dba87b 100644
--- a/src/Cockpit/panel_io.hxx
+++ b/src/Cockpit/panel_io.hxx
@@ -33,9 +33,7 @@
 
 #include STL_IOSTREAM
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(istream);
-#endif
 
 extern FGPanel * fgReadPanel (istream &input);
 extern FGPanel * fgReadPanel (const string &relative_path);
diff --git a/src/FDM/IO360.cxx b/src/FDM/IO360.cxx
index c75b9b3f2..9c256b29a 100644
--- a/src/FDM/IO360.cxx
+++ b/src/FDM/IO360.cxx
@@ -26,9 +26,7 @@
 #include STL_FSTREAM
 #include STL_IOSTREAM
 
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);
-#endif
 
 #include "IO360.hxx"
 #include "LaRCsim/ls_constants.h"
diff --git a/src/FDM/IO360.hxx b/src/FDM/IO360.hxx
index 6eccec850..1f0df8d7c 100644
--- a/src/FDM/IO360.hxx
+++ b/src/FDM/IO360.hxx
@@ -30,9 +30,7 @@
 #include STL_IOSTREAM
 #include STL_FSTREAM
 
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(ofstream);
-#endif
 
 class FGNewEngine {
 
diff --git a/src/FDM/JSBSim/FGColumnVector3.h b/src/FDM/JSBSim/FGColumnVector3.h
index 032333cfa..dad53abf0 100644
--- a/src/FDM/JSBSim/FGColumnVector3.h
+++ b/src/FDM/JSBSim/FGColumnVector3.h
@@ -26,13 +26,11 @@ INCLUDES
 #  include STL_FSTREAM
 #  include STL_IOSTREAM
    SG_USING_STD(string);
-#  if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
-     SG_USING_STD(ostream);
-     SG_USING_STD(istream);
-     SG_USING_STD(cerr);
-     SG_USING_STD(cout);
-     SG_USING_STD(endl);
-#  endif
+   SG_USING_STD(ostream);
+   SG_USING_STD(istream);
+   SG_USING_STD(cerr);
+   SG_USING_STD(cout);
+   SG_USING_STD(endl);
 #else
 #  include <string>
 #  if defined(sgi) && !defined(__GNUC__)
diff --git a/src/FDM/JSBSim/FGColumnVector4.h b/src/FDM/JSBSim/FGColumnVector4.h
index d1e10d802..eca61df03 100644
--- a/src/FDM/JSBSim/FGColumnVector4.h
+++ b/src/FDM/JSBSim/FGColumnVector4.h
@@ -26,13 +26,11 @@ INCLUDES
 #  include STL_FSTREAM
 #  include STL_IOSTREAM
    SG_USING_STD(string);
-#  if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
-     SG_USING_STD(ostream);
-     SG_USING_STD(istream);
-     SG_USING_STD(cerr);
-     SG_USING_STD(cout);
-     SG_USING_STD(endl);
-#  endif
+   SG_USING_STD(ostream);
+   SG_USING_STD(istream);
+   SG_USING_STD(cerr);
+   SG_USING_STD(cout);
+   SG_USING_STD(endl);
 #else
 #  include <string>
 #  if defined (sgi) && !defined(__GNUC__)
diff --git a/src/FDM/JSBSim/FGConfigFile.h b/src/FDM/JSBSim/FGConfigFile.h
index 8b19d78a1..f71367eaf 100644
--- a/src/FDM/JSBSim/FGConfigFile.h
+++ b/src/FDM/JSBSim/FGConfigFile.h
@@ -44,15 +44,13 @@ INCLUDES
 #  include STL_FSTREAM
 #  include STL_IOSTREAM
    SG_USING_STD(string);
-#  if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
-     SG_USING_STD(ostream);
-     SG_USING_STD(istream);
-     SG_USING_STD(ifstream);
-     SG_USING_STD(cerr);
-     SG_USING_STD(endl);
-     SG_USING_STD(ios);
-     SG_USING_STD(cout);
-#  endif
+   SG_USING_STD(ostream);
+   SG_USING_STD(istream);
+   SG_USING_STD(ifstream);
+   SG_USING_STD(cerr);
+   SG_USING_STD(endl);
+   SG_USING_STD(ios);
+   SG_USING_STD(cout);
 #else
 #  include <string>
 #  if defined(sgi) && !defined(__GNUC__)
diff --git a/src/FDM/JSBSim/FGMatrix33.h b/src/FDM/JSBSim/FGMatrix33.h
index 7eff24dd7..74328fa0c 100644
--- a/src/FDM/JSBSim/FGMatrix33.h
+++ b/src/FDM/JSBSim/FGMatrix33.h
@@ -28,13 +28,11 @@ INCLUDES
 #  include STL_FSTREAM
 #  include STL_IOSTREAM
    SG_USING_STD(string);
-#  if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
-     SG_USING_STD(ostream);
-     SG_USING_STD(istream);
-     SG_USING_STD(cerr);
-     SG_USING_STD(cout);
-     SG_USING_STD(endl);
-#  endif
+   SG_USING_STD(ostream);
+   SG_USING_STD(istream);
+   SG_USING_STD(cerr);
+   SG_USING_STD(cout);
+   SG_USING_STD(endl);
 #else
 #  include <string>
 #  if defined(sgi) && !defined(__GNUC__)
diff --git a/src/FDM/JSBSim/FGTank.h b/src/FDM/JSBSim/FGTank.h
index 895308d9f..e689112da 100644
--- a/src/FDM/JSBSim/FGTank.h
+++ b/src/FDM/JSBSim/FGTank.h
@@ -51,11 +51,9 @@ INCLUDES
 #  include <simgear/compiler.h>
 #  include STL_STRING
   SG_USING_STD(string);
-# if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
-   SG_USING_STD(cerr);
-   SG_USING_STD(endl);
-   SG_USING_STD(cout);
-# endif
+  SG_USING_STD(cerr);
+  SG_USING_STD(endl);
+  SG_USING_STD(cout);
 #else
 # include <string>
   using std::string;
diff --git a/src/FDM/JSBSim/FGfdmSocket.h b/src/FDM/JSBSim/FGfdmSocket.h
index df9c3ec7b..a03e58e9c 100644
--- a/src/FDM/JSBSim/FGfdmSocket.h
+++ b/src/FDM/JSBSim/FGfdmSocket.h
@@ -49,10 +49,8 @@ INCLUDES
 #  include STL_STRING
 #  include STL_IOSTREAM
 #  include STL_FSTREAM
-#  if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
-     SG_USING_STD(cout);
-     SG_USING_STD(endl);
-#  endif
+   SG_USING_STD(cout);
+   SG_USING_STD(endl);
 #else
 #  include <string>
 #  if defined(sgi) && !defined(__GNUC__)
diff --git a/src/FDM/LaRCsimIC.cxx b/src/FDM/LaRCsimIC.cxx
index 4e689fc25..2bc6caa05 100644
--- a/src/FDM/LaRCsimIC.cxx
+++ b/src/FDM/LaRCsimIC.cxx
@@ -38,10 +38,8 @@
 #include <FDM/LaRCsim/ls_constants.h>
 #include <FDM/LaRCsim/ls_geodesy.h>
 
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);
 SG_USING_STD(endl);
-#endif
 
 
 LaRCsimIC::LaRCsimIC(void) {
diff --git a/src/FDM/UIUCModel/uiuc_1DdataFileReader.h b/src/FDM/UIUCModel/uiuc_1DdataFileReader.h
index d314043da..4a869de39 100644
--- a/src/FDM/UIUCModel/uiuc_1DdataFileReader.h
+++ b/src/FDM/UIUCModel/uiuc_1DdataFileReader.h
@@ -8,9 +8,7 @@
 #include "uiuc_parsefile.h"
 #include "uiuc_aircraft.h"
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(istrstream);
-#endif
 
 int uiuc_1DdataFileReader( string file_name, 
                             double x[100], 
diff --git a/src/FDM/UIUCModel/uiuc_2DdataFileReader.h b/src/FDM/UIUCModel/uiuc_2DdataFileReader.h
index 708ab1be8..c7ab77ae2 100644
--- a/src/FDM/UIUCModel/uiuc_2DdataFileReader.h
+++ b/src/FDM/UIUCModel/uiuc_2DdataFileReader.h
@@ -8,9 +8,7 @@
 #include "uiuc_parsefile.h"
 #include "uiuc_aircraft.h"
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(istrstream);
-#endif
 
 void uiuc_2DdataFileReader( string file_name, 
                             double x[100][100], 
diff --git a/src/FDM/UIUCModel/uiuc_aircraft.h b/src/FDM/UIUCModel/uiuc_aircraft.h
index c74f05bb1..9d7ca959d 100644
--- a/src/FDM/UIUCModel/uiuc_aircraft.h
+++ b/src/FDM/UIUCModel/uiuc_aircraft.h
@@ -143,10 +143,8 @@
 //#include "uiuc_flapdata.h"
 
 SG_USING_STD(map);
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(iostream);
 SG_USING_STD(ofstream);
-#endif
 
 
 typedef stack :: iterator LIST;
diff --git a/src/FDM/UIUCModel/uiuc_engine.cpp b/src/FDM/UIUCModel/uiuc_engine.cpp
index f7cb61a73..838305a15 100644
--- a/src/FDM/UIUCModel/uiuc_engine.cpp
+++ b/src/FDM/UIUCModel/uiuc_engine.cpp
@@ -73,9 +73,7 @@
 
 #include "uiuc_engine.h"
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cerr);
-#endif
 
 void uiuc_engine() 
 {
diff --git a/src/FDM/UIUCModel/uiuc_gear.cpp b/src/FDM/UIUCModel/uiuc_gear.cpp
index 6a739fc73..99df9b1cb 100644
--- a/src/FDM/UIUCModel/uiuc_gear.cpp
+++ b/src/FDM/UIUCModel/uiuc_gear.cpp
@@ -66,9 +66,7 @@
 
 #include "uiuc_gear.h"
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cerr);
-#endif
 
 
 #define HEIGHT_AGL_WHEEL d_wheel_rwy_local_v[2]
diff --git a/src/FDM/UIUCModel/uiuc_menu.cpp b/src/FDM/UIUCModel/uiuc_menu.cpp
index 3f907885c..2fd30bba8 100644
--- a/src/FDM/UIUCModel/uiuc_menu.cpp
+++ b/src/FDM/UIUCModel/uiuc_menu.cpp
@@ -144,17 +144,16 @@
 #include <stdlib.h>
 #include <string.h>
 #include STL_IOSTREAM
+#include <cstdlib>		// exit
 
 #include "uiuc_menu.h"
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cerr);
 SG_USING_STD(cout);
 SG_USING_STD(endl);
 
-#  ifndef _MSC_VER
+#ifndef _MSC_VER
 SG_USING_STD(exit);
-#  endif
 #endif
 
 bool check_float( const string &token)
diff --git a/src/FDM/UIUCModel/uiuc_parsefile.h b/src/FDM/UIUCModel/uiuc_parsefile.h
index 2b5ac90bf..017938421 100644
--- a/src/FDM/UIUCModel/uiuc_parsefile.h
+++ b/src/FDM/UIUCModel/uiuc_parsefile.h
@@ -10,9 +10,7 @@
 SG_USING_STD(list);
 SG_USING_STD(string);
 SG_USING_STD(getline);
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(ifstream);
-#endif
 
 #define DELIMITERS " \t"
 #define COMMENT "#"
diff --git a/src/FDM/UIUCModel/uiuc_recorder.cpp b/src/FDM/UIUCModel/uiuc_recorder.cpp
index a5ca93c7f..5d554def0 100644
--- a/src/FDM/UIUCModel/uiuc_recorder.cpp
+++ b/src/FDM/UIUCModel/uiuc_recorder.cpp
@@ -84,9 +84,7 @@
 
 #include "uiuc_recorder.h"
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(endl);		// -dw
-#endif
 
 void uiuc_recorder( double dt )
 {
diff --git a/src/FDM/UIUCModel/uiuc_warnings_errors.cpp b/src/FDM/UIUCModel/uiuc_warnings_errors.cpp
index 00cf66688..02d6f8c4a 100644
--- a/src/FDM/UIUCModel/uiuc_warnings_errors.cpp
+++ b/src/FDM/UIUCModel/uiuc_warnings_errors.cpp
@@ -76,16 +76,15 @@ for information.
 **********************************************************************/
 #include <stdlib.h>
 #include <string.h>
+#include <cstdlib>		// exit
 
 #include "uiuc_warnings_errors.h"
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD (cerr);
 SG_USING_STD (endl);
 
-#  ifndef _MSC_VER
+#ifndef _MSC_VER
 SG_USING_STD (exit);
-#  endif
 #endif
 
 void uiuc_warnings_errors(int errorCode, string line)
diff --git a/src/FDM/UIUCModel/uiuc_wrapper.cpp b/src/FDM/UIUCModel/uiuc_wrapper.cpp
index 10b1f362f..e00ccda3c 100644
--- a/src/FDM/UIUCModel/uiuc_wrapper.cpp
+++ b/src/FDM/UIUCModel/uiuc_wrapper.cpp
@@ -99,10 +99,8 @@
 //#include "uiuc_network.h"
 //#include "uiuc_get_flapper.h"
 
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);
 SG_USING_STD(endl);
-#endif
 
 extern "C" void uiuc_init_aeromodel ();
 extern "C" void uiuc_force_moment(double dt);
diff --git a/src/GUI/gui_funcs.cxx b/src/GUI/gui_funcs.cxx
index ffbca06a9..d124c0046 100644
--- a/src/GUI/gui_funcs.cxx
+++ b/src/GUI/gui_funcs.cxx
@@ -96,10 +96,7 @@
 #include "sgVec3Slider.hxx"
 
 SG_USING_STD(string);
-
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_STD(cout);
-#endif
 
 // main.cxx hack, should come from an include someplace
 extern void fgInitVisuals( void );
diff --git a/src/GUI/mouse.cxx b/src/GUI/mouse.cxx
index 6a8750649..f033068e0 100644
--- a/src/GUI/mouse.cxx
+++ b/src/GUI/mouse.cxx
@@ -71,10 +71,7 @@
 #include "gui_local.hxx"
 
 SG_USING_STD(string);
-
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_STD(cout);
-#endif
 
 /* --------------------------------------------------------------------
 Mouse stuff
diff --git a/src/Input/fgjs.cxx b/src/Input/fgjs.cxx
index ffc978697..a5dcffa6c 100644
--- a/src/Input/fgjs.cxx
+++ b/src/Input/fgjs.cxx
@@ -28,12 +28,10 @@
 
 #include <jsinput.h>
 
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(fstream);
 SG_USING_STD(cout);
 SG_USING_STD(endl);
 SG_USING_STD(ios);
-#endif
 SG_USING_STD(string);
 
 string axes_humannames[8] = { "elevator", "ailerons", "rudder", "throttle", 
diff --git a/src/Input/input.cxx b/src/Input/input.cxx
index 6f86ee0c4..302ab8e08 100644
--- a/src/Input/input.cxx
+++ b/src/Input/input.cxx
@@ -61,9 +61,7 @@
 
 #include "input.hxx"
 
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(ifstream);
-#endif
 SG_USING_STD(string);
 SG_USING_STD(vector);
 
diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx
index 758af5dfd..0679b4b0d 100644
--- a/src/Main/fg_commands.cxx
+++ b/src/Main/fg_commands.cxx
@@ -24,10 +24,8 @@
 #include "fg_commands.hxx"
 
 SG_USING_STD(string);
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(ifstream);
 SG_USING_STD(ofstream);
-#endif
 
 #include "fg_props.hxx"
 #include "fg_io.hxx"
diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx
index 93c205d1e..5a2460c3b 100644
--- a/src/Main/fg_props.cxx
+++ b/src/Main/fg_props.cxx
@@ -49,10 +49,8 @@
 #include "fgfs.hxx"
 #include "fg_props.hxx"
 
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(istream);
 SG_USING_STD(ostream);
-#endif
 
 #ifdef FG_WEATHERCM
 static double getWindNorth ();
diff --git a/src/Main/logger.cxx b/src/Main/logger.cxx
index afd32db2c..e7d025267 100644
--- a/src/Main/logger.cxx
+++ b/src/Main/logger.cxx
@@ -6,12 +6,10 @@
 #include "logger.hxx"
 
 #include STL_FSTREAM
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
+#include <string>
+
 SG_USING_STD(ofstream);
 SG_USING_STD(endl);
-#endif
-
-#include <string>
 SG_USING_STD(string);
 
 #include <simgear/debug/logstream.hxx>
diff --git a/src/Main/logger.hxx b/src/Main/logger.hxx
index b585210d9..bf31bf417 100644
--- a/src/Main/logger.hxx
+++ b/src/Main/logger.hxx
@@ -14,17 +14,15 @@
 #  include <config.h>
 #endif
 
+#include <iostream>
+#include <vector>
+
 #include <simgear/compiler.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/exception.hxx>
 #include <simgear/misc/props.hxx>
 
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
-#include <iostream>
 SG_USING_STD(ostream);
-#endif
-
-#include <vector>
 SG_USING_STD(vector);
 
 #include "fgfs.hxx"
diff --git a/src/Main/main.cxx b/src/Main/main.cxx
index 029a1c74e..b74572fb0 100644
--- a/src/Main/main.cxx
+++ b/src/Main/main.cxx
@@ -33,10 +33,8 @@
 #include <simgear/compiler.h>
 
 #include STL_IOSTREAM
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_STD(cerr);
 SG_USING_STD(endl);
-#endif
 
 #include <simgear/misc/exception.hxx>
 #include <simgear/ephemeris/ephemeris.hxx>
diff --git a/src/Model/modelmgr.cxx b/src/Model/modelmgr.cxx
index 3507cc4f6..612992301 100644
--- a/src/Model/modelmgr.cxx
+++ b/src/Model/modelmgr.cxx
@@ -11,6 +11,8 @@
 #include "modelmgr.hxx"
 #include "model.hxx"
 
+SG_USING_STD(find);
+
 
 FGModelMgr::FGModelMgr ()
   : _selector(new ssgSelector)
diff --git a/src/Navaids/fix.hxx b/src/Navaids/fix.hxx
index bf2bd802a..f21dc1443 100644
--- a/src/Navaids/fix.hxx
+++ b/src/Navaids/fix.hxx
@@ -34,17 +34,13 @@
 
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
 #elif defined( __BORLANDC__ ) || (__APPLE__)
 #  include <iostream>
 #else
 #  include <istream.h>
 #endif
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(istream);
-#endif
 
 #include STL_STRING
 SG_USING_STD(string);
diff --git a/src/Navaids/ils.hxx b/src/Navaids/ils.hxx
index 8fd0a2fc2..953132d9f 100644
--- a/src/Navaids/ils.hxx
+++ b/src/Navaids/ils.hxx
@@ -31,17 +31,13 @@
 
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
 #elif defined( __BORLANDC__ ) || (__APPLE__)
 #  include <iostream>
 #else
 #  include <istream.h>
 #endif
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(istream);
-#endif
 
 
 #define FG_ILS_DEFAULT_RANGE 18
diff --git a/src/Navaids/nav.hxx b/src/Navaids/nav.hxx
index 8bb913743..478c47e1e 100644
--- a/src/Navaids/nav.hxx
+++ b/src/Navaids/nav.hxx
@@ -34,17 +34,13 @@
 
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
 #elif defined( __BORLANDC__ ) || (__APPLE__)
 #  include <iostream>
 #else
 #  include <istream.h>
 #endif
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(istream);
-#endif
 
 
 class FGNav {
diff --git a/src/Network/httpd.cxx b/src/Network/httpd.cxx
index f89f14730..162bf45ec 100644
--- a/src/Network/httpd.cxx
+++ b/src/Network/httpd.cxx
@@ -48,10 +48,8 @@
 #include "httpd.hxx"
 
 SG_USING_STD(string);
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);
 SG_USING_STD(istrstream);
-#endif
 
 
 bool FGHttpd::open() {
diff --git a/src/Network/jpg-httpd.cxx b/src/Network/jpg-httpd.cxx
index 63afbffbd..5cbbc5e06 100644
--- a/src/Network/jpg-httpd.cxx
+++ b/src/Network/jpg-httpd.cxx
@@ -47,10 +47,8 @@
 #include "jpg-httpd.hxx"
 
 SG_USING_STD(string);
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);
 SG_USING_STD(istrstream);
-#endif
 
 
 bool FGJpegHttpd::open() {
diff --git a/src/Network/props.cxx b/src/Network/props.cxx
index 551737b3c..de1c870e0 100644
--- a/src/Network/props.cxx
+++ b/src/Network/props.cxx
@@ -42,10 +42,8 @@
 
 #include "props.hxx"
 
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(strstream);
 SG_USING_STD(ends);
-#endif
 
 /**
  * Props connection class.
diff --git a/src/WeatherCM/linintp2.cpp b/src/WeatherCM/linintp2.cpp
index 10f610410..d2ff5fe04 100644
--- a/src/WeatherCM/linintp2.cpp
+++ b/src/WeatherCM/linintp2.cpp
@@ -37,10 +37,8 @@
 #include <stdlib.h>
 #include "linintp2.h"
 
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_NAMESPACE(std);
 SG_USING_STD(cout);
-#endif
 
 //---------------------------------------------------------------------------
 mgcLinInterp2D::mgcLinInterp2D (int _numPoints, double* x, double* y, 
diff --git a/src/WeatherCM/sphrintp.cpp b/src/WeatherCM/sphrintp.cpp
index 9740a8b7b..2366c753b 100644
--- a/src/WeatherCM/sphrintp.cpp
+++ b/src/WeatherCM/sphrintp.cpp
@@ -35,10 +35,8 @@
 #include <math.h>
 #include "sphrintp.h"
 
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_NAMESPACE(std);
 SG_USING_STD(cout);
-#endif
 
 
 static const double PI = 4.0*atan(1.0);
diff --git a/src/WeatherCM/sphrintp.h b/src/WeatherCM/sphrintp.h
index cf60e9e0c..6083fc168 100644
--- a/src/WeatherCM/sphrintp.h
+++ b/src/WeatherCM/sphrintp.h
@@ -38,10 +38,8 @@
 #include "linintp2.h"
 #include <plib/sg.h>
 
-#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
 SG_USING_NAMESPACE(std);
 SG_USING_STD(cout);
-#endif
 
 
 class SphereInterpolate