diff --git a/simgear/compiler.h b/simgear/compiler.h index 5465c082..3195702c 100644 --- a/simgear/compiler.h +++ b/simgear/compiler.h @@ -111,6 +111,26 @@ # define STL_STRSTREAM # endif +# elif __GNUC__ == 3 + // g++-3.0.x +# define SG_EXPLICIT_FUNCTION_TMPL_ARGS +# define SG_NEED_AUTO_PTR +# define SG_MEMBER_TEMPLATES +# define SG_NAMESPACES +# define SG_HAVE_STD +# define SG_HAVE_STREAMBUF +# define SG_CLASS_PARTIAL_SPECIALIZATION +# define SG_HAVE_STD_INCLUDES + +# define STL_ALGORITHM +# define STL_FUNCTIONAL +# define STL_IOMANIP +# define STL_IOSTREAM +# define STL_FSTREAM +# define STL_STDEXCEPT +# define STL_STRING +# define STL_STRSTREAM + # else # error Time to upgrade. GNU compilers < 2.7 not supported # endif diff --git a/simgear/io/decode_binobj.cxx b/simgear/io/decode_binobj.cxx index 1af14819..2cae546d 100644 --- a/simgear/io/decode_binobj.cxx +++ b/simgear/io/decode_binobj.cxx @@ -1,4 +1,12 @@ +#include + #include +#include STL_IOSTREAM + +#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) +SG_USING_STD(cout); +SG_USING_STD(endl); +#endif #include "sg_binobj.hxx" diff --git a/simgear/io/lowtest.cxx b/simgear/io/lowtest.cxx index e588f2c3..843c13f9 100644 --- a/simgear/io/lowtest.cxx +++ b/simgear/io/lowtest.cxx @@ -3,6 +3,12 @@ #include STL_IOSTREAM #include "lowlevel.hxx" +#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) +SG_USING_STD(cout); +SG_USING_STD(endl); +#endif + + static const int sgEndianTest = 1; #define sgIsLittleEndian (*((char *) &sgEndianTest ) != 0) #define sgIsBigEndian (*((char *) &sgEndianTest ) == 0) diff --git a/simgear/io/socktest.cxx b/simgear/io/socktest.cxx index 471f0ad6..38c38a6e 100644 --- a/simgear/io/socktest.cxx +++ b/simgear/io/socktest.cxx @@ -1,8 +1,16 @@ +#include + #include +#include STL_IOSTREAM #include "sg_socket.hxx" #include "lowlevel.hxx" +#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) +SG_USING_STD(cout); +SG_USING_STD(endl); +#endif + static const int sgEndianTest = 1; #define sgIsLittleEndian (*((char *) &sgEndianTest ) != 0) #define sgIsBigEndian (*((char *) &sgEndianTest ) == 0) diff --git a/simgear/metar/MetarStation.h b/simgear/metar/MetarStation.h index b6f38762..d551c596 100644 --- a/simgear/metar/MetarStation.h +++ b/simgear/metar/MetarStation.h @@ -88,7 +88,7 @@ private: const CMetarStation &rObj ); // Assignment operator. Not implemented. - friend CMetarStationDB; + friend class CMetarStationDB; }; diff --git a/simgear/misc/props_test.cxx b/simgear/misc/props_test.cxx index 17f82c7e..8d18162d 100644 --- a/simgear/misc/props_test.cxx +++ b/simgear/misc/props_test.cxx @@ -10,6 +10,7 @@ #if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) SG_USING_STD(cout); +SG_USING_STD(cerr); SG_USING_STD(endl); #endif diff --git a/simgear/misc/zfstream.cxx b/simgear/misc/zfstream.cxx index fc795ee3..d470ec35 100644 --- a/simgear/misc/zfstream.cxx +++ b/simgear/misc/zfstream.cxx @@ -41,7 +41,7 @@ gzfilebuf::gzfilebuf() : streambuf(), file(NULL), -#if defined( __MWERKS__ ) +#if defined( __MWERKS__ ) || __GNUC__ > 2 mode(ios_openmode(0)), #else mode(0), diff --git a/simgear/route/routetest.cxx b/simgear/route/routetest.cxx index 2de066e7..313ed528 100644 --- a/simgear/route/routetest.cxx +++ b/simgear/route/routetest.cxx @@ -1,8 +1,16 @@ +#include #include +#include STL_IOSTREAM + #include "route.hxx" #include "waypoint.hxx" +#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) +SG_USING_STD(cout); +SG_USING_STD(endl); +#endif + int main() { SGRoute route; diff --git a/simgear/route/waytest.cxx b/simgear/route/waytest.cxx index e8825b8e..bc31b9c5 100644 --- a/simgear/route/waytest.cxx +++ b/simgear/route/waytest.cxx @@ -1,6 +1,16 @@ +#include #include + +#include STL_IOSTREAM + #include "waypoint.hxx" +#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) +SG_USING_STD(cout); +SG_USING_STD(endl); +#endif + + int main() { SGWayPoint a1(-93.216923, 44.880547, 0.0, SGWayPoint::WGS84, "KMSP"); SGWayPoint a2(-93.216923, 44.880547, 0.0, SGWayPoint::SPHERICAL, "KMSP"); diff --git a/simgear/serial/serial.cxx b/simgear/serial/serial.cxx index 3fa85bdc..0859122d 100644 --- a/simgear/serial/serial.cxx +++ b/simgear/serial/serial.cxx @@ -24,6 +24,8 @@ #include +#include STL_IOSTREAM + #ifdef SG_HAVE_STD_INCLUDE # include #else @@ -44,6 +46,11 @@ #include "serial.hxx" +#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) +SG_USING_STD(cout); +SG_USING_STD(endl); +#endif + FGSerialPort::FGSerialPort() : dev_open(false) diff --git a/simgear/serial/testserial.cxx b/simgear/serial/testserial.cxx index 51735138..d005f32f 100644 --- a/simgear/serial/testserial.cxx +++ b/simgear/serial/testserial.cxx @@ -1,9 +1,18 @@ -#include +#include + +#include STL_STRING +#include STL_IOSTREAM #include #include "serial.hxx" +#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) +SG_USING_STD(cout); +SG_USING_STD(endl); +#endif + + int main () { FGSerialPort port; string value;