Patch from Erik Hofman:

This patch adds some more functionality to the header files and removes
*all* dependencies on SG_HAVE_NATIVE_SGI_COMPILERS in the SimGear code!

[dpm: I had to add some additional SG_USING_STD declarations to make
it compile]
This commit is contained in:
david
2002-12-31 14:47:34 +00:00
parent f8a49c41ef
commit 78411d29a7
31 changed files with 80 additions and 99 deletions
+29
View File
@@ -2,6 +2,35 @@ includedir = @includedir@/compatibility
EXTRA_DIST = README
include_HEADERS = \
cfloat \
csetjmp \
cstdio \
cwchar \
iostream \
strstream \
cassert \
climits \
csignal \
cstdlib \
cwctype \
istream \
cctype \
clocale \
cstdarg \
cstring \
fstream \
iterator \
cerrno \
cmath \
cstddef \
ctime \
iomanip \
streambuf
includedir = @includedir@/compatibility
EXTRA_DIST = README
include_HEADERS = \
cfloat \
csetjmp \
+8
View File
@@ -3,6 +3,7 @@
#define __SG_IOSTREAM 1
# include <iostream.h>
# include <fstream.h>
#if defined(sgi) && !defined(__GNUC__)
@@ -20,7 +21,14 @@
using ::cout;
using ::cerr;
using ::clog;
using ::endl;
using ::ios_base;
using ::istream;
using ::ostream;
using ::ifstream;
using ::ofstream;
};
#endif
+5 -1
View File
@@ -2,10 +2,14 @@
#ifndef __SG_ISTREAM
#define __SG_ISTREAM 1
# include <iostream>
#if defined(sgi) && !defined(__GNUC__)
# include <stream.h>
# include <iostream>
# include <string>
using std::getline;
#endif
+17 -8
View File
@@ -2,27 +2,36 @@
#ifndef __SG_STREAMBUF
#define __SG_STREAMBUF 1
#if defined(sgi) && !defined(__GNUC__)
# include <char_traits.h>
# include <iostream>
# include <char_traits.h>
# define pubsync sync
//
// Until we find a good way to rename the original streambuf class
// and derive our own streambuf class from that, define this variable
// for now so the code can inherit our streambuf class instead.
//
# define SG_NEED_STREAMBUF_HACK 1
using std::char_traits;
class __streambuf : virtual public streambuf {
public:
typedef char_traits<char> traits_type;
typedef char_traits<char>::int_type int_type;
typedef std::char_traits<char> traits_type;
typedef std::char_traits<char>::int_type int_type;
typedef streampos pos_type;
typedef streamoff off_type;
};
#if defined(sgi) && !defined(__GNUC__)
# define pubsync sync
namespace std {
using ::streambuf;
using ::streampos;
using ::streamoff;
};
#endif
#endif // !__SG_STREAMBUF