mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0026823: Configuration - use EGL on another platform without GLX
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include <OSD.hxx>
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <stdio.h>
|
||||
#if defined(isfinite)
|
||||
# define finite isfinite
|
||||
@@ -125,6 +125,10 @@ void OSD::MilliSecSleep(const Standard_Integer aDelay)
|
||||
|
||||
Standard_Boolean OSD::IsDivisible(const Standard_Real theDividend,const Standard_Real theDivisor)
|
||||
{
|
||||
#ifdef __QNX__
|
||||
using std::finite;
|
||||
#endif
|
||||
|
||||
if ( theDivisor == 0. || ! finite(theDividend) ) return Standard_False;
|
||||
//
|
||||
// you may divide by infinity
|
||||
|
@@ -57,7 +57,7 @@
|
||||
//=======================================================================
|
||||
void OSD_Chronometer::GetProcessCPU (Standard_Real& UserSeconds, Standard_Real& SystemSeconds)
|
||||
{
|
||||
#if defined(__linux__) || defined(linux) || defined(__FreeBSD__) || defined(__ANDROID__)
|
||||
#if defined(__linux__) || defined(linux) || defined(__FreeBSD__) || defined(__ANDROID__) || defined(__QNX__)
|
||||
static const long aCLK_TCK = sysconf(_SC_CLK_TCK);
|
||||
#else
|
||||
static const long aCLK_TCK = CLK_TCK;
|
||||
@@ -87,7 +87,7 @@ void OSD_Chronometer::GetThreadCPU (Standard_Real& theUserSeconds,
|
||||
theUserSeconds = Standard_Real(aTaskInfo.user_time.seconds) + 0.000001 * aTaskInfo.user_time.microseconds;
|
||||
theSystemSeconds = Standard_Real(aTaskInfo.system_time.seconds) + 0.000001 * aTaskInfo.system_time.microseconds;
|
||||
}
|
||||
#elif (defined(_POSIX_TIMERS) && defined(_POSIX_THREAD_CPUTIME)) || defined(__ANDROID__)
|
||||
#elif (defined(_POSIX_TIMERS) && defined(_POSIX_THREAD_CPUTIME)) || defined(__ANDROID__) || defined(__QNX__)
|
||||
// on Linux, only user times are available for threads via clock_gettime()
|
||||
struct timespec t;
|
||||
if (!clock_gettime (CLOCK_THREAD_CPUTIME_ID, &t))
|
||||
|
@@ -21,8 +21,8 @@
|
||||
#include <Standard_ProgramError.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
static OSD_SysType whereAmI(){
|
||||
#if defined(__digital__) || defined(__FreeBSD__) || defined(SUNOS) || defined(__APPLE__)
|
||||
static OSD_SysType whereAmI() {
|
||||
#if defined(__digital__) || defined(__FreeBSD__) || defined(SUNOS) || defined(__APPLE__) || defined(__QNX__)
|
||||
return OSD_UnixBSD;
|
||||
}
|
||||
#elif defined(sgi) || defined(IRIX) || defined(__sun) || defined(SOLARIS) || defined(__sco__) || defined(__hpux) || defined(HPUX)
|
||||
|
@@ -70,7 +70,7 @@ typedef void (* SIG_PFV) (int);
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#if !defined(__ANDROID__)
|
||||
#if !defined(__ANDROID__) && !defined(__QNX__)
|
||||
#include <sys/signal.h>
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user