replace __PPU__ by __CELLOS_LV2__, to avoid conflict with IBM Cell SDK (ppu-g++)

This commit is contained in:
ejcoumans
2007-06-27 06:55:41 +00:00
parent 0ef218424c
commit fa2ff30db4

View File

@@ -32,7 +32,7 @@ subject to the following restrictions:
#define USE_BT_CLOCK 1 #define USE_BT_CLOCK 1
#ifdef USE_BT_CLOCK #ifdef USE_BT_CLOCK
#ifdef __PPU__ #ifdef __CELLOS_LV2__
#include <sys/sys_time.h> #include <sys/sys_time.h>
#include <stdio.h> #include <stdio.h>
typedef uint64_t __int64; typedef uint64_t __int64;
@@ -81,7 +81,7 @@ class btClock
mStartTick = GetTickCount(); mStartTick = GetTickCount();
mPrevElapsedTime = 0; mPrevElapsedTime = 0;
#else #else
#ifdef __PPU__ #ifdef __CELLOS_LV2__
typedef uint64_t __int64; typedef uint64_t __int64;
typedef __int64 ClockSize; typedef __int64 ClockSize;
@@ -134,7 +134,7 @@ class btClock
return msecTicks; return msecTicks;
#else #else
#ifdef __PPU__ #ifdef __CELLOS_LV2__
__int64 freq=sys_time_get_timebase_frequency(); __int64 freq=sys_time_get_timebase_frequency();
double dFreq=((double) freq) / 1000.0; double dFreq=((double) freq) / 1000.0;
typedef uint64_t __int64; typedef uint64_t __int64;
@@ -149,7 +149,7 @@ class btClock
gettimeofday(&currentTime, 0); gettimeofday(&currentTime, 0);
return (currentTime.tv_sec - mStartTime.tv_sec) * 1000 + return (currentTime.tv_sec - mStartTime.tv_sec) * 1000 +
(currentTime.tv_usec - mStartTime.tv_usec) / 1000; (currentTime.tv_usec - mStartTime.tv_usec) / 1000;
#endif //__PPU__ #endif //__CELLOS_LV2__
#endif #endif
} }
@@ -192,7 +192,7 @@ class btClock
return usecTicks; return usecTicks;
#else #else
#ifdef __PPU__ #ifdef __CELLOS_LV2__
__int64 freq=sys_time_get_timebase_frequency(); __int64 freq=sys_time_get_timebase_frequency();
double dFreq=((double) freq)/ 1000000.0; double dFreq=((double) freq)/ 1000000.0;
typedef uint64_t __int64; typedef uint64_t __int64;
@@ -207,7 +207,7 @@ class btClock
gettimeofday(&currentTime, 0); gettimeofday(&currentTime, 0);
return (currentTime.tv_sec - mStartTime.tv_sec) * 1000000 + return (currentTime.tv_sec - mStartTime.tv_sec) * 1000000 +
(currentTime.tv_usec - mStartTime.tv_usec); (currentTime.tv_usec - mStartTime.tv_usec);
#endif//__PPU__ #endif//__CELLOS_LV2__
#endif #endif
} }
@@ -218,12 +218,12 @@ class btClock
LONGLONG mPrevElapsedTime; LONGLONG mPrevElapsedTime;
LARGE_INTEGER mStartTime; LARGE_INTEGER mStartTime;
#else #else
#ifdef __PPU__ #ifdef __CELLOS_LV2__
uint64_t mStartTime; uint64_t mStartTime;
#else #else
struct timeval mStartTime; struct timeval mStartTime;
#endif #endif
#endif //__PPU__ #endif //__CELLOS_LV2__
}; };