From d613e0a488a19592ac363eaf7ecdd959f89db965 Mon Sep 17 00:00:00 2001 From: ehofman Date: Thu, 24 Jul 2008 19:16:50 +0000 Subject: [PATCH] Patch to remove macintosh and MWERKS from Simgear. --- simgear/compiler.h | 34 --------------------------------- simgear/debug/logstream.hxx | 6 ------ simgear/misc/sg_path.cxx | 5 ----- simgear/misc/sgstream.cxx | 16 ---------------- simgear/misc/zfstream.cxx | 4 ---- simgear/screen/colors.hxx | 5 +---- simgear/timing/lowleveltime.cxx | 5 ----- simgear/timing/timestamp.cxx | 13 ------------- 8 files changed, 1 insertion(+), 87 deletions(-) diff --git a/simgear/compiler.h b/simgear/compiler.h index 19b0c778..733e54cf 100644 --- a/simgear/compiler.h +++ b/simgear/compiler.h @@ -171,40 +171,6 @@ #endif // __KCC -// -// Metrowerks -// -#if defined(__MWERKS__) -/* - CodeWarrior compiler from Metrowerks, Inc. -*/ -# define SG_HAVE_TRAITS -# define SG_HAVE_STD_INCLUDES -# define SG_HAVE_STD -# define SG_NAMESPACES - -# define STL_ALGORITHM -# define STL_FUNCTIONAL -# define STL_IOMANIP -# define STL_IOSTREAM -# define STL_ITERATOR -# define STL_FSTREAM -# define STL_STDEXCEPT -# define STL_STRING - -// Temp: -# define bcopy(from, to, n) memcpy(to, from, n) - -// -rp- please use FG_MEM_COPY everywhere ! -// #define FG_MEM_COPY(to,from,n) memcpy(to, from, n) - -// -dw- currently used glut has no game mode stuff -# define GLUT_WRONG_VERSION - -# define SG_COMPILER_STR "Metrowerks CodeWarrior C++ version " SG_STRINGIZE(__MWERKS__) - -#endif // __MWERKS__ - // // Microsoft compilers. // diff --git a/simgear/debug/logstream.hxx b/simgear/debug/logstream.hxx index cb712ae4..1b97803e 100644 --- a/simgear/debug/logstream.hxx +++ b/simgear/debug/logstream.hxx @@ -44,10 +44,6 @@ SG_USING_STD(streambuf); SG_USING_STD(ostream); -#ifdef __MWERKS__ -SG_USING_STD(iostream); -#endif - // // TODO: // @@ -303,8 +299,6 @@ sglog() */ #ifdef FG_NDEBUG # define SG_LOG(C,P,M) -#elif defined( __MWERKS__ ) -# define SG_LOG(C,P,M) ::sglog() << ::loglevel(C,P) << M << std::endl #else # define SG_LOG(C,P,M) sglog() << loglevel(C,P) << M << std::endl #endif diff --git a/simgear/misc/sg_path.cxx b/simgear/misc/sg_path.cxx index f5c7a8c8..6055becd 100644 --- a/simgear/misc/sg_path.cxx +++ b/simgear/misc/sg_path.cxx @@ -39,13 +39,8 @@ * define directory path separators */ -#if defined( macintosh ) -static const char sgDirPathSep = ':'; -static const char sgDirPathSepBad = '/'; -#else static const char sgDirPathSep = '/'; static const char sgDirPathSepBad = '\\'; -#endif #if defined( WIN32 ) && !defined(__CYGWIN__) static const char sgSearchPathSep = ';'; diff --git a/simgear/misc/sgstream.cxx b/simgear/misc/sgstream.cxx index 484dce73..ec758afb 100644 --- a/simgear/misc/sgstream.cxx +++ b/simgear/misc/sgstream.cxx @@ -109,11 +109,7 @@ skipeol( istream& in ) char c = '\0'; // skip to end of line. -#ifdef __MWERKS__ - while ( in.get(c) && c != '\0' ) { -#else while ( in.get(c) ) { -#endif if ( (c == '\n') || (c == '\r') ) { break; } @@ -125,17 +121,9 @@ skipeol( istream& in ) istream& skipws( istream& in ) { char c; -#ifdef __MWERKS__ - while ( in.get(c) && c != '\0' ) { -#else while ( in.get(c) ) { -#endif -#ifdef __MWERKS__ - if ( ! isspace( c ) && c != '\n' ) { -#else if ( ! isspace( c ) ) { -#endif // put pack the non-space character in.putback(c); break; @@ -150,11 +138,7 @@ skipcomment( istream& in ) while ( in ) { // skip whitespace -#ifdef __MWERKS__ - in >> ::skipws; -#else in >> skipws; -#endif char c; if ( in.get( c ) && c != '#' ) diff --git a/simgear/misc/zfstream.cxx b/simgear/misc/zfstream.cxx index 1d02b4e0..0df3c810 100644 --- a/simgear/misc/zfstream.cxx +++ b/simgear/misc/zfstream.cxx @@ -40,11 +40,7 @@ gzfilebuf::gzfilebuf() : std::streambuf(), file(NULL), -#if defined( __MWERKS__ ) || __GNUC__ > 2 mode(ios_openmode(0)), -#else - mode(0), -#endif own_file_descriptor(false), ibuf_size(0), ibuffer(0) diff --git a/simgear/screen/colors.hxx b/simgear/screen/colors.hxx index 887c3828..c3ea8e7e 100644 --- a/simgear/screen/colors.hxx +++ b/simgear/screen/colors.hxx @@ -26,10 +26,7 @@ #include -#if defined( macintosh ) -const float system_gamma = 1.4; - -#elif defined (sgi) +#if defined (sgi) const float system_gamma = 2.0/1.7; #else // others diff --git a/simgear/timing/lowleveltime.cxx b/simgear/timing/lowleveltime.cxx index a5505269..9d20655d 100644 --- a/simgear/timing/lowleveltime.cxx +++ b/simgear/timing/lowleveltime.cxx @@ -306,16 +306,11 @@ static void fgtzset_internal (int always, const char *tz) /* User specified the empty string; use UTC explicitly. */ tz = "Universal"; -#ifdef macintosh - /* as you well know, mac paths contain leading colon, this code - messes things up.... */ -#else /* A leading colon means "implementation defined syntax". We ignore the colon and always use the same algorithm: try a data file, and if none exists parse the 1003.1 syntax. */ if (tz && *tz == ':') ++tz; -#endif /* Check whether the value changes since the last run. */ if (old_fgtz != NULL && tz != NULL && strcmp (tz, old_fgtz) == 0) diff --git a/simgear/timing/timestamp.cxx b/simgear/timing/timestamp.cxx index 3f8b7c9c..dcda28ec 100644 --- a/simgear/timing/timestamp.cxx +++ b/simgear/timing/timestamp.cxx @@ -50,12 +50,6 @@ # include // for get/setitimer, gettimeofday, struct timeval #endif -// -dw- want to use metrowerks time.h -#ifdef macintosh -# include -# include -#endif - #ifdef WIN32 # include # if defined( __CYGWIN__ ) || defined( __CYGWIN32__ ) @@ -91,13 +85,6 @@ void SGTimeStamp::stamp() { ftime(¤t); seconds = current.time; usec = current.millitm * 1000; -// -dw- uses time manager -#elif defined( macintosh ) - UnsignedWide ms; - Microseconds(&ms); - - seconds = ms.lo / 1000000; - usec = ms.lo - ( seconds * 1000000 ); #else # error Port me #endif -- 2.39.5