From: curt Date: Fri, 2 Mar 2001 22:52:04 +0000 (+0000) Subject: Changes for the native Irix CC compiler contributed by Erik Hofman. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e07af680183126847f1547a7ad8101e43fbe9023;p=simgear.git Changes for the native Irix CC compiler contributed by Erik Hofman. --- diff --git a/SimGear.dsp b/SimGear.dsp index e5103bbd..a4529ea4 100644 --- a/SimGear.dsp +++ b/SimGear.dsp @@ -538,6 +538,175 @@ SOURCE=.\simgear\math\vector.cxx !ENDIF +# End Source File +# End Group +# Begin Group "Lib_sgmetar" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\simgear\metar\Antoi.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\Charcmp.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\Dcdmetar.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\Dcdmtrmk.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\Drvmetar.c + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\Fracpart.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\MetarReport.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\MetarStation.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\Prtdmetr.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\Stspack2.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\simgear\metar\Stspack3.cpp + +!IF "$(CFG)" == "SimGear - Win32 Release" + +# PROP Intermediate_Dir "Release\Lib_sgmetar" + +!ELSEIF "$(CFG)" == "SimGear - Win32 Debug" + +# PROP Intermediate_Dir "Debug\Lib_sgmetar" + +!ENDIF + # End Source File # End Group # Begin Group "Lib_sgmisc" diff --git a/configure.in b/configure.in index fbd3deb8..083e3a55 100644 --- a/configure.in +++ b/configure.in @@ -273,6 +273,7 @@ AC_OUTPUT( \ simgear/io/Makefile \ simgear/magvar/Makefile \ simgear/math/Makefile \ + simgear/metar/Makefile \ simgear/misc/Makefile \ simgear/route/Makefile \ simgear/screen/Makefile \ diff --git a/simgear/Makefile.am b/simgear/Makefile.am index baf586c7..7d62acec 100644 --- a/simgear/Makefile.am +++ b/simgear/Makefile.am @@ -16,8 +16,8 @@ else ZLIB_DIRS = zlib endif -METAR_DIRS = -# METAR_DIRS = metar +# METAR_DIRS = +METAR_DIRS = metar EXTRA_DIST = version.h.in diff --git a/simgear/ephemeris/stardata.cxx b/simgear/ephemeris/stardata.cxx index 3804988e..f153b527 100644 --- a/simgear/ephemeris/stardata.cxx +++ b/simgear/ephemeris/stardata.cxx @@ -27,7 +27,7 @@ #include "stardata.hxx" -#ifdef _MSC_VER +#if defined (_MSC_VER) || defined (FG_HAVE_NATIVE_SGI_COMPILERS) FG_USING_STD(getline); #endif diff --git a/simgear/io/sg_binobj.cxx b/simgear/io/sg_binobj.cxx index 359ee4cf..487ff9a1 100644 --- a/simgear/io/sg_binobj.cxx +++ b/simgear/io/sg_binobj.cxx @@ -42,8 +42,11 @@ FG_USING_STD( string ); FG_USING_STD( vector ); + +#if !defined (FG_HAVE_NATIVE_SGI_COMPILERS) FG_USING_STD( cout ); FG_USING_STD( endl ); +#endif enum { diff --git a/simgear/metar/Makefile.am b/simgear/metar/Makefile.am index b9ed36ea..e6c07316 100644 --- a/simgear/metar/Makefile.am +++ b/simgear/metar/Makefile.am @@ -2,11 +2,13 @@ includedir = @includedir@/metar lib_LIBRARIES = libsgmetar.a +include_HEADERS = MetarReport.h MetarStation.h + libsgmetar_a_SOURCES = \ Antoi.cpp Charcmp.cpp Dcdmetar.cpp Dcdmtrmk.cpp Drvmetar.c \ Fracpart.cpp Local.h Metar.h \ - MetarReport.cpp MetarReport.h \ - MetarStation.cpp MetarStation.h \ + MetarReport.cpp \ + MetarStation.cpp \ Prtdmetr.cpp Stspack2.cpp Stspack3.cpp INCLUDES += -I$(top_srcdir) diff --git a/simgear/metar/MetarReport.cpp b/simgear/metar/MetarReport.cpp index 3e3d7a57..c8a9b5a0 100644 --- a/simgear/metar/MetarReport.cpp +++ b/simgear/metar/MetarReport.cpp @@ -45,6 +45,21 @@ char *CMetarReport::StationID() return ((Decoded_METAR *)m_DecodedReport)->stnid; } +int CMetarReport::Day() +{ + return ((Decoded_METAR*)m_DecodedReport)->ob_date; +} + +int CMetarReport::Hour() +{ + return ((Decoded_METAR*)m_DecodedReport)->ob_hour; +} + +int CMetarReport::Minutes() +{ + return ((Decoded_METAR*)m_DecodedReport)->ob_minute; +} + int CMetarReport::WindDirection() { return ((Decoded_METAR *)m_DecodedReport)->winData.windDir; @@ -253,7 +268,29 @@ operator << ( ostream& out, CMetarReport& p ) } +double CMetarReport::AirPressure() +{ + return ((Decoded_METAR *)m_DecodedReport)->inches_altstng; +} + void CMetarReport::dump() { prtDMETR( (Decoded_METAR *)m_DecodedReport ); } + +double CMetarReport::PrevailVisibility() { + //Values from each visibility field converted to meters. + double smiles; + double km; + double meters; + smiles = ((Decoded_METAR*) m_DecodedReport)->prevail_vsbySM * 621 ; + km = ((Decoded_METAR*) m_DecodedReport)->prevail_vsbyKM * 1000; + meters = ((Decoded_METAR*) m_DecodedReport)->prevail_vsbyM; + + /* Return the smallest one. If the field is specified it should have been + set to MAX_INT */ + if(smiles < km && smiles < meters) + return smiles; + else + return km < meters ? km : meters; +} diff --git a/simgear/metar/MetarReport.h b/simgear/metar/MetarReport.h index 36c53c4b..0d5f4cd2 100644 --- a/simgear/metar/MetarReport.h +++ b/simgear/metar/MetarReport.h @@ -38,6 +38,10 @@ public: char *StationID(); + int Day(); // The day of month on which the report was issued. + int Hour(); // The hour of the day the report was issued. + int Minutes(); //Minutes past the hour of the report issue time. + // Directions in degrees // Speed in knots // Altitude in meters @@ -93,7 +97,9 @@ public: int VariableSkyLayerHeight(); int SnowDepthInches(); - + + double AirPressure(); //Return the air pressure in InchesHg. + double PrevailVisibility(); // Prevailing Visibility in meters. void dump(); private: diff --git a/simgear/metar/MetarStation.cpp b/simgear/metar/MetarStation.cpp index 22d49027..a4ac3707 100644 --- a/simgear/metar/MetarStation.cpp +++ b/simgear/metar/MetarStation.cpp @@ -4,19 +4,8 @@ #include "MetarStation.h" #include -#define TESTPROG -#ifndef TESTPROG -// options is too tightly integrated into FlightGear to use in a test program -#include
-#endif -#include - - -std::vector< CMetarStation *> METAR_Stations; -int CMetarStation::initialized( CMetarStation::initialize() ); - -std::string CMetarStation::tempName; +#include double CMetarStation::decodeDMS( char *b ) @@ -53,6 +42,9 @@ double CMetarStation::decodeDMS( char *b ) return r * DEG_TO_RAD; } +// Constructor +// Decodes METAR station string of this format: +// KPUB;72;464;Pueblo, Pueblo Memorial Airport;CO;United States;4;38-17-24N;104-29-54W;38-17-03N;104-29-43W;1440;1420;P CMetarStation::CMetarStation( char *s ) @@ -82,6 +74,7 @@ CMetarStation::CMetarStation( double ulongitude = decodeDMS( s ); s = t; t = strchr( s, ';' ); *t = 0; t++; double altitude = atoi( s ) * FEET_TO_METER; + m_altitude = altitude; s = t; t = strchr( s, ';' ); *t = 0; t++; double ualtitude = atoi( s ) * FEET_TO_METER; Point3D p( longitude, latitude, altitude+EQUATORIAL_RADIUS_M ); @@ -93,30 +86,47 @@ CMetarStation::CMetarStation( s = t; m_pFlag = s[0]; } - // Constructor - // Decodes METAR station string of this format: - // KPUB;72;464;Pueblo, Pueblo Memorial Airport;CO;United States;4;38-17-24N;104-29-54W;38-17-03N;104-29-43W;1440;1420;P + -int CMetarStation::initialize() +void CMetarStation::dump() +{ + std::cout << "ID:" << ID(); + std::cout << std::endl; + std::cout << "number:" << number(); + std::cout << std::endl; + std::cout << "name:" << name(); + std::cout << std::endl; + std::cout << "state:" << state(); + std::cout << std::endl; + std::cout << "country:" << country(); + std::cout << std::endl; + std::cout << "region:" << region(); + std::cout << std::endl; + std::cout << "Location (cart):" << locationCart(); + std::cout << std::endl; + std::cout << "Location (polar):" << locationPolar(); + std::cout << std::endl; + std::cout << "Upper Location (cart):" << upperLocationCart(); + std::cout << std::endl; + std::cout << "Upper Location (polar):" << upperLocationPolar(); + std::cout << std::endl; + std::cout << "P flag:" << pFlag(); + std::cout << std::endl; +} + + + +CMetarStationDB::CMetarStationDB(const char * dbPath) { // Read the list of metar stations, decoding and adding to global list. CMetarStation *m; char buf[256]; - // Goto the Flight Gear installation directory -#ifdef TESTPROG - //FGPath weatherPath( "/mkv/Build/FlightGear" ); - FGPath weatherPath( ":Data" ); -#else - FGPath weatherPath( current_options.get_fg_root() ); -#endif - weatherPath.append( "Weather" ); - weatherPath.append( "MetarStations" ); // Open the metar station list - FILE *f = fopen( weatherPath.c_str(), "r" ); + FILE *f = fopen( dbPath, "r" ); if ( f != NULL ) { @@ -125,89 +135,61 @@ int CMetarStation::initialize() //std::cout << buf << std::endl; m = new CMetarStation( buf ); //m->dump(); - METAR_Stations.push_back( m ); + METAR_Stations[m->ID()]=( m ); } // Close the list fclose( f ); // std::cout << METAR_Stations.size() << " Metar stations" << std::endl; - return 1; + } else { // std::cout << "Could not open MetarStations file " << std::endl; - return 0; + } } -int CMetarStation::sameName( CMetarStation *m ) -{ - return m->m_ID == tempName; -} - - -CMetarStation *CMetarStation::find( std::string stationID ) -{ - tempName = stationID; - CMetarStation **m = std::find_if( METAR_Stations.begin(), METAR_Stations.end(), sameName ); - if ( m != METAR_Stations.end() ) return *m; - return 0; -} - -double bestDist; -CMetarStation *bestStation; -Point3D curLocation; -void findHelper( CMetarStation *s ) +CMetarStation * CMetarStationDB::find( std::string stationID ) { - double dist = s->locationCart().distance3Dsquared( curLocation ); - if (dist < bestDist ) - { - bestDist = dist; - bestStation = s; - } + std::map::iterator target; + target = METAR_Stations.find(stationID); + if(target!= METAR_Stations.end() ) + return target->second; + else + return NULL; } -CMetarStation *CMetarStation::find( Point3D locationCart ) -{ - bestDist = 99999999; - bestStation = 0; - curLocation = locationCart; - for_each( findHelper ); - return bestStation; -} - -void CMetarStation::for_each( void f( CMetarStation *s ) ) +CMetarStation * CMetarStationDB::find( Point3D locationCart ) { - std::for_each( METAR_Stations.begin(), METAR_Stations.end(), f ); + std::map::iterator itr; + double bestDist = 99999999; + CMetarStation * bestStation; + Point3D curLocation = locationCart; + itr = METAR_Stations.begin(); + while(itr != METAR_Stations.end()) + { + double dist = itr->second->locationCart().distance3Dsquared( curLocation ); + if (dist < bestDist ) + { + bestDist = dist; + bestStation = itr->second; + } + itr++; + } + + return bestStation; } -void CMetarStation::dump() -{ - std::cout << "ID:" << ID(); - std::cout << std::endl; - std::cout << "number:" << number(); - std::cout << std::endl; - std::cout << "name:" << name(); - std::cout << std::endl; - std::cout << "state:" << state(); - std::cout << std::endl; - std::cout << "country:" << country(); - std::cout << std::endl; - std::cout << "region:" << region(); - std::cout << std::endl; - std::cout << "Location (cart):" << locationCart(); - std::cout << std::endl; - std::cout << "Location (polar):" << locationPolar(); - std::cout << std::endl; - std::cout << "Upper Location (cart):" << upperLocationCart(); - std::cout << std::endl; - std::cout << "Upper Location (polar):" << upperLocationPolar(); - std::cout << std::endl; - std::cout << "P flag:" << pFlag(); - std::cout << std::endl; +CMetarStationDB::~CMetarStationDB() { + std::map::iterator itr; + for(itr = METAR_Stations.begin(); itr != METAR_Stations.end(); itr++) + { + delete itr->second; + } } std::ostream& diff --git a/simgear/metar/MetarStation.h b/simgear/metar/MetarStation.h index 8169a9c9..54b74de1 100644 --- a/simgear/metar/MetarStation.h +++ b/simgear/metar/MetarStation.h @@ -3,7 +3,7 @@ // METAR station information is kept in this file: // http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.gz // http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.txt -// This class looks for the file FG_ROOT/Weather/MetarStations instread of nsd_cccc. + #ifndef _MetarStation_ #define _MetarStation_ @@ -11,10 +11,13 @@ #include #include #include +#include #include #include //using namespace std; +class CMetarStationDB; + class CMetarStation { // Attributes @@ -32,14 +35,12 @@ private: int m_altitude; int m_upperAltitude; char m_pFlag; - - static int initialized; - static std::string tempName; - + // Operations private: double decodeDMS( char *b ); - static int sameName( CMetarStation *m ); + + CMetarStation( char *s ); @@ -57,6 +58,8 @@ public: std::string &state() { return m_state; } std::string &country() { return m_country; } int region() { return m_region; } + unsigned int Altitude() { //Returns the stations height above MSL in M. + return m_altitude;} Point3D &locationPolar() { return m_locationPolar; } Point3D &upperLocationPolar() { return m_upperLocationPolar; } Point3D &locationCart() { return m_locationCart; } @@ -67,9 +70,8 @@ public: friend std::ostream& operator << ( std::ostream&, const CMetarStation& ); void dump(); - static CMetarStation *find( std::string stationID ); - static CMetarStation *find( Point3D locationCart ); - static void for_each( void f( CMetarStation *s ) ); + + private: CMetarStation( @@ -80,8 +82,23 @@ private: const CMetarStation &rObj ); // Assignment operator. Not implemented. - static int initialize(); + friend CMetarStationDB; }; +class CMetarStationDB +{ + + private: + std::string databasePath; //The path of the database file. + std::map METAR_Stations; + CMetarStation * bestStation; + + public: + CMetarStation *find( std::string stationID ); + CMetarStation * find( Point3D locationCart ); + CMetarStationDB(const char * dbFile); + ~CMetarStationDB(); +}; + #endif diff --git a/simgear/misc/props.cxx b/simgear/misc/props.cxx index d1d69678..8405748c 100644 --- a/simgear/misc/props.cxx +++ b/simgear/misc/props.cxx @@ -6,15 +6,23 @@ // // $Id$ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + #include #include -#include +#include STL_IOSTREAM #include #include "props.hxx" -using std::cerr; -using std::endl; -using std::sort; +#if !defined(FG_HAVE_NATIVE_SGI_COMPILERS) +FG_USING_STD(cerr); +FG_USING_STD(endl); +#endif +FG_USING_STD(sort); diff --git a/simgear/misc/props.hxx b/simgear/misc/props.hxx index a4579732..d49f181d 100644 --- a/simgear/misc/props.hxx +++ b/simgear/misc/props.hxx @@ -9,16 +9,24 @@ #ifndef __PROPS_HXX #define __PROPS_HXX +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + #include -#include +#include STL_STRING #include -#include +#include STL_IOSTREAM -using std::string; -using std::vector; -using std::istream; -using std::ostream; +FG_USING_STD(string); +FG_USING_STD(vector); +#if !defined(FG_HAVE_NATIVE_SGI_COMPILERS) +FG_USING_STD(istream); +FG_USING_STD(ostream); +#endif #ifdef UNKNOWN #pragma warn A sloppy coder has defined UNKNOWN as a macro! diff --git a/simgear/misc/props_io.cxx b/simgear/misc/props_io.cxx index a113db5e..b1294937 100644 --- a/simgear/misc/props_io.cxx +++ b/simgear/misc/props_io.cxx @@ -3,6 +3,8 @@ # include #endif +#include + #include // atof() atoi() #include @@ -10,17 +12,23 @@ #include "props.hxx" -#include -#include -#include +#include STL_IOSTREAM +#if !defined(FG_HAVE_NATIVE_SGI_COMPILERS) +# include +#else +# include +#endif +#include STL_STRING #include -using std::istream; -using std::ifstream; -using std::ostream; -using std::ofstream; -using std::string; -using std::vector; +#if !defined(FG_HAVE_NATIVE_SGI_COMPILERS) +FG_USING_STD(istream); +FG_USING_STD(ifstream); +FG_USING_STD(ostream); +FG_USING_STD(ofstream); +#endif +FG_USING_STD(string); +FG_USING_STD(vector); diff --git a/simgear/misc/props_test.cxx b/simgear/misc/props_test.cxx index 9f1b0d4f..3fa2333b 100644 --- a/simgear/misc/props_test.cxx +++ b/simgear/misc/props_test.cxx @@ -3,11 +3,19 @@ // Test harness. //////////////////////////////////////////////////////////////////////// -#include +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include STL_IOSTREAM #include "props.hxx" -using std::cout; -using std::endl; +#if !defined(FG_HAVE_NATIVE_SGI_COMPILERS) +FG_USING_STD(cout); +FG_USING_STD(endl); +#endif diff --git a/simgear/sky/cloud.cxx b/simgear/sky/cloud.cxx index 372360b9..78bde43c 100644 --- a/simgear/sky/cloud.cxx +++ b/simgear/sky/cloud.cxx @@ -20,8 +20,10 @@ # include #endif +#include + #include -#include +#include STL_IOSTREAM #include #include diff --git a/simgear/sky/moon.cxx b/simgear/sky/moon.cxx index dffbb523..91049ef4 100644 --- a/simgear/sky/moon.cxx +++ b/simgear/sky/moon.cxx @@ -32,7 +32,7 @@ #include #include -#include +#include STL_IOSTREAM #include #include diff --git a/simgear/sky/oursun.cxx b/simgear/sky/oursun.cxx index 2cac096c..a1c08306 100644 --- a/simgear/sky/oursun.cxx +++ b/simgear/sky/oursun.cxx @@ -29,8 +29,10 @@ # include #endif +#include + #include -#include +#include STL_IOSTREAM #include #include diff --git a/simgear/sky/sphere.cxx b/simgear/sky/sphere.cxx index 442c4341..0993d6ad 100644 --- a/simgear/sky/sphere.cxx +++ b/simgear/sky/sphere.cxx @@ -34,7 +34,11 @@ #include #include -FG_USING_NAMESPACE(std); +#if !defined (FG_HAVE_NATIVE_SGI_COMPILERS) +FG_USING_STD(cout); +FG_USING_STD(endl); +#endif + // return a sphere object as an ssgBranch ssgBranch *ssgMakeSphere( ssgSimpleState *state, ssgColourArray *cl, @@ -114,11 +118,11 @@ ssgBranch *ssgMakeSphere( ssgSimpleState *state, ssgColourArray *cl, new ssgVtxTable ( GL_TRIANGLE_STRIP, vl, nl, tl, cl ); if ( vl->getNum() != nl->getNum() ) { - std::cout << "bad sphere1\n"; + cout << "bad sphere1" << endl; exit(-1); } if ( vl->getNum() != tl->getNum() ) { - std::cout << "bad sphere2\n"; + cout << "bad sphere2" << endl; exit(-1); } slice->setState( state ); diff --git a/simgear/sky/stars.cxx b/simgear/sky/stars.cxx index 3a72f4a1..c96a2080 100644 --- a/simgear/sky/stars.cxx +++ b/simgear/sky/stars.cxx @@ -29,8 +29,10 @@ # include #endif +#include + #include -#include +#include STL_IOSTREAM #include #include @@ -39,8 +41,10 @@ #include "stars.hxx" +#if !defined (FG_HAVE_NATIVE_SGI_COMPILERS) FG_USING_STD(cout); FG_USING_STD(endl); +#endif // Set up star rendering call backs diff --git a/simgear/timing/sg_time.cxx b/simgear/timing/sg_time.cxx index 16d50d3e..3ee4bc9d 100644 --- a/simgear/timing/sg_time.cxx +++ b/simgear/timing/sg_time.cxx @@ -80,7 +80,7 @@ SGTime::SGTime( double lon, double lat, const string& root ) // cout << "Current local time = " // << asctime(localtime(&cur_time)) << endl; - if ( root != "" ) { + if ( root != (string)"" ) { FGPath zone( root ); zone.append( "zone.tab" ); FG_LOG( FG_EVENT, FG_DEBUG, "Reading timezone info from: " diff --git a/simgear/xml/easyxml.hxx b/simgear/xml/easyxml.hxx index ec4d31b1..6ed67cec 100644 --- a/simgear/xml/easyxml.hxx +++ b/simgear/xml/easyxml.hxx @@ -1,13 +1,21 @@ #ifndef __EASYXML_HXX #define __EASYXML_HXX -#include -#include +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include STL_IOSTREAM +#include STL_STRING #include -using std::istream; -using std::string; -using std::vector; +#if !defined(FG_HAVE_NATIVE_SGI_COMPILERS) +FG_USING_STD(istream); +#endif +FG_USING_STD(string); +FG_USING_STD(vector); /**