From 9af5f9f094706685bae09a885fb6adf6394124c2 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 13 Dec 2000 21:12:15 +0000 Subject: [PATCH] MacOS tweaks contributed by Darrell Walisser. --- simgear/bucket/newbucket.hxx | 3 ++- simgear/debug/logstream.hxx | 2 -- simgear/ephemeris/jupiter.hxx | 4 ++-- simgear/ephemeris/mars.hxx | 4 ++-- simgear/ephemeris/neptune.hxx | 4 ++-- simgear/ephemeris/saturn.hxx | 4 ++-- simgear/ephemeris/uranus.hxx | 4 ++-- simgear/ephemeris/venus.hxx | 4 ++-- simgear/io/sg_socket.hxx | 3 +-- simgear/math/point3d.hxx | 2 +- simgear/metar/MetarStation.cpp | 2 +- simgear/misc/props_io.cxx | 18 +++++++++++------- simgear/route/route.hxx | 2 +- simgear/sky/cloud.hxx | 6 +++--- simgear/sky/stars.cxx | 2 -- simgear/timing/lowleveltime.cxx | 2 +- simgear/xml/easyxml.cxx | 2 ++ 17 files changed, 35 insertions(+), 33 deletions(-) diff --git a/simgear/bucket/newbucket.hxx b/simgear/bucket/newbucket.hxx index a0a4f036..9ae5f609 100644 --- a/simgear/bucket/newbucket.hxx +++ b/simgear/bucket/newbucket.hxx @@ -44,7 +44,8 @@ // already depending on how you defined FG_HAVE_STD_INCLUDES, but I // can go ahead and add this -- CLO #ifdef __MWERKS__ -# include // needed fabs() +FG_USING_STD(sprintf); +FG_USING_STD(fabs); #endif #include STL_STRING diff --git a/simgear/debug/logstream.hxx b/simgear/debug/logstream.hxx index a4c4464a..669ce045 100644 --- a/simgear/debug/logstream.hxx +++ b/simgear/debug/logstream.hxx @@ -49,8 +49,6 @@ FG_USING_STD(endl); #endif #ifdef __MWERKS__ -# define cerr std::cerr -# define endl std::endl FG_USING_STD(iostream); #endif diff --git a/simgear/ephemeris/jupiter.hxx b/simgear/ephemeris/jupiter.hxx index 3e345cc3..04bf19c0 100644 --- a/simgear/ephemeris/jupiter.hxx +++ b/simgear/ephemeris/jupiter.hxx @@ -25,8 +25,8 @@ #ifndef _JUPITER_HXX_ #define _JUPITER_HXX_ -#include "celestialBody.hxx" -#include "star.hxx" +#include +#include class Jupiter : public CelestialBody { diff --git a/simgear/ephemeris/mars.hxx b/simgear/ephemeris/mars.hxx index 3968a05a..307f3812 100644 --- a/simgear/ephemeris/mars.hxx +++ b/simgear/ephemeris/mars.hxx @@ -25,8 +25,8 @@ #ifndef _MARS_HXX_ #define _MARS_HXX_ -#include "celestialBody.hxx" -#include "star.hxx" +#include +#include class Mars : public CelestialBody { diff --git a/simgear/ephemeris/neptune.hxx b/simgear/ephemeris/neptune.hxx index a31c5468..81f75ff5 100644 --- a/simgear/ephemeris/neptune.hxx +++ b/simgear/ephemeris/neptune.hxx @@ -25,8 +25,8 @@ #ifndef _NEPTUNE_HXX_ #define _NEPTUNE_HXX_ -#include "celestialBody.hxx" -#include "star.hxx" +#include +#include class Neptune : public CelestialBody { diff --git a/simgear/ephemeris/saturn.hxx b/simgear/ephemeris/saturn.hxx index 7c78f7d8..c1731ade 100644 --- a/simgear/ephemeris/saturn.hxx +++ b/simgear/ephemeris/saturn.hxx @@ -25,8 +25,8 @@ #ifndef _SATURN_HXX_ #define _SATURN_HXX_ -#include "celestialBody.hxx" -#include "star.hxx" +#include +#include class Saturn : public CelestialBody { diff --git a/simgear/ephemeris/uranus.hxx b/simgear/ephemeris/uranus.hxx index 675d258d..5932822b 100644 --- a/simgear/ephemeris/uranus.hxx +++ b/simgear/ephemeris/uranus.hxx @@ -25,8 +25,8 @@ #ifndef _URANUS_HXX_ #define _URANUS_HXX_ -#include "celestialBody.hxx" -#include "star.hxx" +#include +#include class Uranus : public CelestialBody { diff --git a/simgear/ephemeris/venus.hxx b/simgear/ephemeris/venus.hxx index bdc05aba..4f48d0a8 100644 --- a/simgear/ephemeris/venus.hxx +++ b/simgear/ephemeris/venus.hxx @@ -25,8 +25,8 @@ #ifndef _VENUS_HXX_ #define _VENUS_HXX_ -#include "celestialBody.hxx" -#include "star.hxx" +#include +#include class Venus : public CelestialBody { diff --git a/simgear/io/sg_socket.hxx b/simgear/io/sg_socket.hxx index 22915a2a..0d393f4f 100644 --- a/simgear/io/sg_socket.hxx +++ b/simgear/io/sg_socket.hxx @@ -34,8 +34,7 @@ #include STL_STRING #include - -#include "iochannel.hxx" +#include FG_USING_STD(string); diff --git a/simgear/math/point3d.hxx b/simgear/math/point3d.hxx index 26284a15..6e51b7a5 100644 --- a/simgear/math/point3d.hxx +++ b/simgear/math/point3d.hxx @@ -46,7 +46,7 @@ # include #endif -#include "localconsts.hxx" +#include // I don't understand ... or should be included // already depending on how you defined FG_HAVE_STD_INCLUDES, but I diff --git a/simgear/metar/MetarStation.cpp b/simgear/metar/MetarStation.cpp index 927106c0..22d49027 100644 --- a/simgear/metar/MetarStation.cpp +++ b/simgear/metar/MetarStation.cpp @@ -89,7 +89,7 @@ CMetarStation::CMetarStation( m_locationCart = sgPolarToCart3d( p ); Point3D up( ulongitude, ulatitude, ualtitude+EQUATORIAL_RADIUS_M ); m_upperLocationPolar = up; - m_upperLocationCart = fgPolarToCart3d( up ); + m_upperLocationCart = sgPolarToCart3d( up ); s = t; m_pFlag = s[0]; } diff --git a/simgear/misc/props_io.cxx b/simgear/misc/props_io.cxx index ebe0f0f6..d7671bd1 100644 --- a/simgear/misc/props_io.cxx +++ b/simgear/misc/props_io.cxx @@ -3,6 +3,9 @@ # include #endif +#include // strcmp() +#include // atof() atoi() + #include #include @@ -13,12 +16,11 @@ #include #include -using std::istream; -using std::ifstream; -using std::ostream; -using std::ofstream; -using std::string; -using std::vector; +FG_USING_STD(ofstream); +FG_USING_STD(ifstream); +FG_USING_STD(string); +FG_USING_STD(vector); + //////////////////////////////////////////////////////////////////////// @@ -265,6 +267,8 @@ getTypeName (SGValue::Type type) case SGValue::STRING: return "string"; } + + return "unknown"; // avoid a compiler warning } @@ -274,7 +278,7 @@ getTypeName (SGValue::Type type) static void writeData (ostream &output, const string &data) { - for (int i = 0; i < data.size(); i++) { + for (int i = 0; i < (int)data.size(); i++) { switch (data[i]) { case '&': output << "&"; diff --git a/simgear/route/route.hxx b/simgear/route/route.hxx index 2fe2edc1..cd241148 100644 --- a/simgear/route/route.hxx +++ b/simgear/route/route.hxx @@ -42,7 +42,7 @@ FG_USING_STD(string); FG_USING_STD(vector); -#include "waypoint.hxx" +#include class SGRoute { diff --git a/simgear/sky/cloud.hxx b/simgear/sky/cloud.hxx index f4980707..4d117e14 100644 --- a/simgear/sky/cloud.hxx +++ b/simgear/sky/cloud.hxx @@ -42,9 +42,9 @@ FG_USING_STD(string); enum SGCloudType { SG_CLOUD_OVERCAST = 0, - SG_CLOUD_MOSTLY_CLOUDY = 1, - SG_CLOUD_MOSTLY_SUNNY = 2, - SG_CLOUD_CIRRUS = 3, + SG_CLOUD_MOSTLY_CLOUDY, + SG_CLOUD_MOSTLY_SUNNY, + SG_CLOUD_CIRRUS }; diff --git a/simgear/sky/stars.cxx b/simgear/sky/stars.cxx index e9c43c47..3a72f4a1 100644 --- a/simgear/sky/stars.cxx +++ b/simgear/sky/stars.cxx @@ -39,10 +39,8 @@ #include "stars.hxx" -#ifdef _MSC_VER FG_USING_STD(cout); FG_USING_STD(endl); -#endif // Set up star rendering call backs diff --git a/simgear/timing/lowleveltime.cxx b/simgear/timing/lowleveltime.cxx index 4c3d24f2..ec3cf988 100644 --- a/simgear/timing/lowleveltime.cxx +++ b/simgear/timing/lowleveltime.cxx @@ -304,7 +304,7 @@ static void fgtzset_internal (int always, const char *tz) /* User specified the empty string; use UTC explicitly. */ tz = "Universal"; -#ifdef MACOS +#ifdef macintosh /* as you well know, mac paths contain leading colon, this code messes things up.... */ #else diff --git a/simgear/xml/easyxml.cxx b/simgear/xml/easyxml.cxx index 979d0877..83e0735a 100644 --- a/simgear/xml/easyxml.cxx +++ b/simgear/xml/easyxml.cxx @@ -6,6 +6,8 @@ #include +#include // strcmp() + #include "easyxml.hxx" #include "xmlparse.h" -- 2.39.5