From a203a1b127a4ace3c80c04a98a820427069f57ff Mon Sep 17 00:00:00 2001 From: Bryan THRALL Date: Tue, 16 Oct 2001 20:56:46 +0000 Subject: [PATCH] *** empty log message *** --- include/osg/FrameStamp | 4 ++-- include/osg/Timer | 8 ++++---- src/osg/FrameStamp.cpp | 4 ++-- src/osg/Timer.cpp | 10 ++++++++-- src/osgGLUT/Viewer.cpp | 2 -- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/include/osg/FrameStamp b/include/osg/FrameStamp index 889d358d8..ba740760c 100644 --- a/include/osg/FrameStamp +++ b/include/osg/FrameStamp @@ -38,8 +38,8 @@ class SG_EXPORT FrameStamp : public Referenced void setReferenceTime(double refTime) { _referenceTime = refTime; } double getReferenceTime() const { return _referenceTime; } - void setCalanderTime(const tm& calanderTime); - void getCalanderTime(tm& calanderTime) const; + void setCalanderTime(const std::tm& calanderTime); + void getCalanderTime(std::tm& calanderTime) const; protected: diff --git a/include/osg/Timer b/include/osg/Timer index 6b81741cc..e72d5eb16 100644 --- a/include/osg/Timer +++ b/include/osg/Timer @@ -18,7 +18,7 @@ namespace osg { typedef unsigned long long Timer_t; #elif defined(unix) typedef unsigned long long Timer_t; -#elif defined __APPLE__ // MACOSX PJA +#elif defined __APPLE__ || defined macintosh typedef double Timer_t; #else #include @@ -33,12 +33,12 @@ class SG_EXPORT Timer { Timer(); ~Timer() {} - #ifdef __APPLE__ + #if defined __APPLE__ || defined macintosh // PJA MAC OSX - inline Tick() pollutes namespace so badly // we cant compile, due to Carbon.h ... Timer_t tick(); #else - inline Timer_t tick(); + inline Timer_t tick(); #endif inline double delta_s( Timer_t t1, Timer_t t2 ) const { return (double)(t2 - t1)*_secsPerClick; } @@ -150,7 +150,7 @@ namespace osg{ } }; -#elif !defined (__APPLE_CC__) +#elif !defined (__APPLE_CC__) && !defined (macintosh) // no choice, always use std::clock() diff --git a/src/osg/FrameStamp.cpp b/src/osg/FrameStamp.cpp index 79774412d..4d22b5d06 100644 --- a/src/osg/FrameStamp.cpp +++ b/src/osg/FrameStamp.cpp @@ -47,7 +47,7 @@ FrameStamp& FrameStamp::operator = (const FrameStamp& fs) return *this; } -void FrameStamp::setCalanderTime(const tm& ct) +void FrameStamp::setCalanderTime(const std::tm& ct) { tm_sec = ct.tm_sec; /* Seconds. [0-60] (1 leap second) */ tm_min = ct.tm_min; /* Minutes. [0-59] */ @@ -60,7 +60,7 @@ void FrameStamp::setCalanderTime(const tm& ct) tm_isdst = ct.tm_isdst; /* DST. [-1/0/1]*/ } -void FrameStamp::getCalanderTime(tm& ct) const +void FrameStamp::getCalanderTime(std::tm& ct) const { ct.tm_sec = tm_sec; /* Seconds. [0-60] (1 leap second) */ ct.tm_min = tm_min; /* Minutes. [0-59] */ diff --git a/src/osg/Timer.cpp b/src/osg/Timer.cpp index 04e808e61..5a8bfb3b0 100644 --- a/src/osg/Timer.cpp +++ b/src/osg/Timer.cpp @@ -180,8 +180,14 @@ using namespace osg; _secsPerClick = (double)(cycleval)* 1e-12; } } -#elif defined (__APPLE_CC__) // MACOSX PJA -#include // do I really have to link against the Carbon framework just for this? +#elif defined (__APPLE_CC__) || defined (macintosh) + +#if defined (__APPLE_CC__) + #include // do I really have to link against the Carbon framework just for this? +#else + #include + #include +#endif Timer_t Timer::tick(void) { diff --git a/src/osgGLUT/Viewer.cpp b/src/osgGLUT/Viewer.cpp index a1b781163..428c18baf 100644 --- a/src/osgGLUT/Viewer.cpp +++ b/src/osgGLUT/Viewer.cpp @@ -109,10 +109,8 @@ Viewer::Viewer() osg::notify(osg::INFO)<<"Scene Graph Viewer (sgv)"<