fgrun fixes

This commit is contained in:
ehofman
2003-12-11 13:17:45 +00:00
parent 92a123a47d
commit ad394fb090
2 changed files with 25 additions and 1 deletions

View File

@@ -8,8 +8,28 @@
namespace std {
using ::fstream;
using ::ifstream;
using ::ofstream;
# ifdef SG_HAVE_NATIVE_SGI_COMPILERS
using ::ifstream;
# else
class ifstream : public ::ifstream {
private:
::ifstream *ifs;
public:
ifstream() { ifs = new ::ifstream(); }
ifstream(int fd) { ifs = new ::ifstream(fd); }
ifstream(int fd, char* p, int l) { ifs = new ::ifstream(fd, p, l); }
ifstream(const char* name, int mode=ios::in, int prot=filebuf::openprot)
{ ifs = new ::ifstream(name, mode, prot); };
~ifstream() { delete ifs; }
filebuf* rdbuf() { return ifs->rdbuf(); }
void open(const char* name, int mode=ios::in, int prot=filebuf::openprot)
{ ifs->open(name, mode, prot); }
int is_open() { return (!ifs->fail() && !ifs->eof()); }
};
# endif
};

View File

@@ -307,7 +307,11 @@
# define STL_ITERATOR <iterator>
# define STL_FSTREAM <fstream>
# define STL_STDEXCEPT <stdexcept>
#if (_COMPILER_VERSION < 740)
# define STL_STRING <simgear/compatibility/irix_string>
#else
# define STL_STRING <string>
#endif
# define STL_STRSTREAM <strstream>
#pragma set woff 1001,1012,1014,1116,1155,1172,1174