Patch to remove macintosh and MWERKS from Simgear.
This commit is contained in:
@@ -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 <algorithm>
|
||||
# define STL_FUNCTIONAL <functional>
|
||||
# define STL_IOMANIP <iomanip>
|
||||
# define STL_IOSTREAM <iostream>
|
||||
# define STL_ITERATOR <iterator>
|
||||
# define STL_FSTREAM <fstream>
|
||||
# define STL_STDEXCEPT <stdexcept>
|
||||
# define STL_STRING <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.
|
||||
//
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = ';';
|
||||
|
||||
@@ -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 != '#' )
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -26,10 +26,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -50,12 +50,6 @@
|
||||
# include <sys/time.h> // for get/setitimer, gettimeofday, struct timeval
|
||||
#endif
|
||||
|
||||
// -dw- want to use metrowerks time.h
|
||||
#ifdef macintosh
|
||||
# include <time.h>
|
||||
# include <timer.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# include <windows.h>
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user