gcc-3.0.x fixes.

This commit is contained in:
curt 2001-05-23 19:25:27 +00:00
parent 2f39b688f4
commit 30a14741c9
11 changed files with 80 additions and 3 deletions

View File

@ -111,6 +111,26 @@
# 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

View 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"

View 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)

View 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)

View File

@ -88,7 +88,7 @@ private:
const CMetarStation &rObj );
// Assignment operator. Not implemented.
friend CMetarStationDB;
friend class CMetarStationDB;
};

View 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

View 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),

View 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;

View 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");

View File

@ -24,6 +24,8 @@
#include <simgear/compiler.h>
#include STL_IOSTREAM
#ifdef SG_HAVE_STD_INCLUDE
# include <cerrno>
#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)

View 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;