]> git.mxchange.org Git - simgear.git/commitdiff
gcc-3.0.x fixes.
authorcurt <curt>
Wed, 23 May 2001 19:25:27 +0000 (19:25 +0000)
committercurt <curt>
Wed, 23 May 2001 19:25:27 +0000 (19:25 +0000)
simgear/compiler.h
simgear/io/decode_binobj.cxx
simgear/io/lowtest.cxx
simgear/io/socktest.cxx
simgear/metar/MetarStation.h
simgear/misc/props_test.cxx
simgear/misc/zfstream.cxx
simgear/route/routetest.cxx
simgear/route/waytest.cxx
simgear/serial/serial.cxx
simgear/serial/testserial.cxx

index 5465c082aefc14ffa1d18e3249a4dd8a160c6cc0..3195702cc3d7b27f123eec36dff5dcce89012c95 100644 (file)
 #      define STL_STRSTREAM  <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  <algorithm>
+#      define STL_FUNCTIONAL <functional>
+#      define STL_IOMANIP    <iomanip>
+#      define STL_IOSTREAM   <iostream>
+#      define STL_FSTREAM    <fstream>
+#      define STL_STDEXCEPT  <stdexcept>
+#      define STL_STRING     <string>
+#      define STL_STRSTREAM  <strstream>
+
 #  else
 #    error Time to upgrade. GNU compilers < 2.7 not supported
 #  endif
index 1af14819f386463abc3da74bdc58c17009c31a29..2cae546d5b926c07e0b0859dd9f46e45309e3495 100644 (file)
@@ -1,4 +1,12 @@
+#include <simgear/compiler.h>
+
 #include <unistd.h>
+#include STL_IOSTREAM
+
+#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
+SG_USING_STD(cout);
+SG_USING_STD(endl);
+#endif
 
 #include "sg_binobj.hxx"
 
index e588f2c35601baf2df7f0b23a624385a9ea81802..843c13f9756d9d40a513dcd40176a58c8c29fa34 100644 (file)
@@ -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)
index 471f0ad6ca06b32cfc5f3406c8547b9e348e57a7..38c38a6e98272621319b8605b1563bbd0e018631 100644 (file)
@@ -1,8 +1,16 @@
+#include <simgear/compiler.h>
+
 #include <unistd.h>
+#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)
index b6f387624aecfeff3b96a035dcb141a9892119d5..d551c596480e8263e2c6aae556597a7d8ec535ab 100644 (file)
@@ -88,7 +88,7 @@ private:
                const CMetarStation &rObj );
                        // Assignment operator.  Not implemented.
 
-       friend CMetarStationDB;
+       friend class CMetarStationDB;
 };
 
 
index 17f82c7ee79d3016963e1d6ac3c22607192edcc8..8d18162d4e12314f19952b918bfbf8d77453d05a 100644 (file)
@@ -10,6 +10,7 @@
 
 #if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);
+SG_USING_STD(cerr);
 SG_USING_STD(endl);
 #endif
 
index fc795ee3ecbada4d2e0b15ff6a654a6fc081f4ba..d470ec35e525251de29cd0af562189a10edc48f3 100644 (file)
@@ -41,7 +41,7 @@
 gzfilebuf::gzfilebuf()
     : streambuf(),
       file(NULL),
-#if defined( __MWERKS__ )
+#if defined( __MWERKS__ ) || __GNUC__ > 2
       mode(ios_openmode(0)),
 #else
       mode(0),
index 2de066e7e53a37caeb1b17efc6ecdef9044db938..313ed528b764615e3de6831e68608b27b9b36f30 100644 (file)
@@ -1,8 +1,16 @@
+#include <simgear/compiler.h>
 #include <simgear/constants.h>
 
+#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;
 
index e8825b8e427136a3d92ad8b31718e075f6cb0fb8..bc31b9c59157a04d0c887f676424341e4ce2889a 100644 (file)
@@ -1,6 +1,16 @@
+#include <simgear/compiler.h>
 #include <simgear/constants.h>
+
+#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");
index 3fa85bdc1b7f9fd4508fdae46872dd5038838c75..0859122d291a35087967b3d356ba5ef89b92e46a 100644 (file)
@@ -24,6 +24,8 @@
 
 #include <simgear/compiler.h>
 
+#include STL_IOSTREAM
+
 #ifdef SG_HAVE_STD_INCLUDE
 #  include <cerrno>
 #else
 
 #include "serial.hxx"
 
+#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
+SG_USING_STD(cout);
+SG_USING_STD(endl);
+#endif
+
 
 FGSerialPort::FGSerialPort()
     : dev_open(false)
index 517351385d6250d99faa7153f45a9b6b1f87acac..d005f32fee3cc7c2df37a340d4fcd734c2ac7965 100644 (file)
@@ -1,9 +1,18 @@
-#include <string>
+#include <simgear/compiler.h>
+
+#include STL_STRING
+#include STL_IOSTREAM
 
 #include <simgear/debug/logstream.hxx>
 
 #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;