From 604110b2453dbdff571d854257960410397fe323 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 20 Jan 2002 16:24:54 +0000 Subject: [PATCH] Updates to help compilation under gcc 3.03. --- include/osgDB/Output | 4 +++- src/osgDB/FileNameUtils.cpp | 20 ++++++++++++++------ src/osgDB/Output.cpp | 16 ++++++++++------ 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/include/osgDB/Output b/include/osgDB/Output index f0e52f15a..5710c6183 100644 --- a/include/osgDB/Output +++ b/include/osgDB/Output @@ -28,7 +28,9 @@ class OSGDB_EXPORT Output : public std::ofstream virtual ~Output(); void open(const char *name); - void open(const char *name,int mode); + + // comment out temporarily to avoid compilation problems, RO Jan 2002. + // void open(const char *name,int mode); Output& indent(); diff --git a/src/osgDB/FileNameUtils.cpp b/src/osgDB/FileNameUtils.cpp index c2768572c..94c4b858e 100644 --- a/src/osgDB/FileNameUtils.cpp +++ b/src/osgDB/FileNameUtils.cpp @@ -1,13 +1,21 @@ #include - -// mac requires std::tolower, but IRIX MipsPro doesn't like it, -// so use this preprocessor to allow mac and mipspro to work. -#ifdef macintosh -using std::tolower; -using std::strlen; +#ifdef __sgi + #include +#else + #include + using std::tolower; + using std::strlen; #endif +// +// // mac requires std::tolower, but IRIX MipsPro doesn't like it, +// // so use this preprocessor to allow mac and mipspro to work. +// #ifdef macintosh +// using std::tolower; +// using std::strlen; +// #endif + std::string osgDB::getFilePath(const std::string& fileName) { std::string::size_type slash = fileName.find_last_of('/'); diff --git a/src/osgDB/Output.cpp b/src/osgDB/Output.cpp index b67ef6b21..dff348a2e 100644 --- a/src/osgDB/Output.cpp +++ b/src/osgDB/Output.cpp @@ -44,12 +44,16 @@ void Output::open(const char *name) _filename = name; } -void Output::open(const char *name,int mode) -{ - init(); - ofstream::open(name,mode); - _filename = name; -} +// Comment out to avoid compile errors under new compilers, the int mode +// is now a replaced by a class to wrap the mode. +// This method is not used right now to hopefully nobody will miss it... +// Jan 2002. +// void Output::open(const char *name,int mode) +// { +// init(); +// ofstream::open(name,mode); +// _filename = name; +// } Output& Output::indent() {