set aFrmsMap(CSF_TclLibs) "Tcl"
set aFrmsMap(CSF_TclTkLibs) "Tk"
} else {
- set aLibsMap(CSF_ThreadLibs) "pthread rt"
- set aLibsMap(CSF_OpenGlLibs) "GL"
- set aLibsMap(CSF_TclLibs) "tcl8.6"
- set aLibsMap(CSF_TclTkLibs) "X11 tk8.6"
- set aLibsMap(CSF_XwLibs) "X11 Xext Xmu Xi"
- set aLibsMap(CSF_MotifLibs) "X11"
+ if { "$theOS" == "qnx" } {
+ # CSF_ThreadLibs - pthread API is part og libc on QNX
+ set aLibsMap(CSF_OpenGlLibs) "EGL GLESv2"
+ set aLibsMap(CSF_TclLibs) "tcl8.6"
+ set aLibsMap(CSF_TclTkLibs) "tk8.6"
+ } else {
+ set aLibsMap(CSF_ThreadLibs) "pthread rt"
+ set aLibsMap(CSF_OpenGlLibs) "GL"
+ set aLibsMap(CSF_TclLibs) "tcl8.6"
+ set aLibsMap(CSF_TclTkLibs) "X11 tk8.6"
+ set aLibsMap(CSF_XwLibs) "X11 Xext Xmu Xi"
+ set aLibsMap(CSF_MotifLibs) "X11"
+ }
}
# optional 3rd-parties
# Release target configuration
puts $aFile "\t\t\t<Target title=\"Release\">"
if { "$theIsExe" == "true" } {
- puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/bin/${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
+ puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/bin/${theProjName}\" prefix_auto=\"0\" extension_auto=\"0\" />"
puts $aFile "\t\t\t\t<Option type=\"1\" />"
} else {
if { "$aWokStation" == "wnt" } {
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/lib/${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
} else {
- puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/lib/lib${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
+ puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/lib/lib${theProjName}.so\" prefix_auto=\"0\" extension_auto=\"0\" />"
}
puts $aFile "\t\t\t\t<Option type=\"3\" />"
}
} else {
puts $aFile "\t\t\t\t<Option compiler=\"gcc\" />"
}
- puts $aFile "\t\t\t\t<Option createDefFile=\"1\" />"
- puts $aFile "\t\t\t\t<Option createStaticLib=\"1\" />"
+ puts $aFile "\t\t\t\t<Option createDefFile=\"0\" />"
+ puts $aFile "\t\t\t\t<Option createStaticLib=\"0\" />"
# compiler options per TARGET (including defines)
puts $aFile "\t\t\t\t<Compiler>"
} else {
puts $aFile "\t\t\t\t\t<Add option=\"-O2\" />"
puts $aFile "\t\t\t\t\t<Add option=\"-std=c++0x\" />"
- puts $aFile "\t\t\t\t\t<Add option=\"-mmmx\" />"
- puts $aFile "\t\t\t\t\t<Add option=\"-msse\" />"
- puts $aFile "\t\t\t\t\t<Add option=\"-msse2\" />"
- puts $aFile "\t\t\t\t\t<Add option=\"-mfpmath=sse\" />"
+ if { "$aWokStation" != "qnx" } {
+ puts $aFile "\t\t\t\t\t<Add option=\"-mmmx\" />"
+ puts $aFile "\t\t\t\t\t<Add option=\"-msse\" />"
+ puts $aFile "\t\t\t\t\t<Add option=\"-msse2\" />"
+ puts $aFile "\t\t\t\t\t<Add option=\"-mfpmath=sse\" />"
+ }
}
foreach aMacro $theDefines {
puts $aFile "\t\t\t\t\t<Add option=\"-D${aMacro}\" />"
}
puts $aFile "\t\t\t\t\t<Add option=\"-DNDEBUG\" />"
+ if { "$aWokStation" == "qnx" } {
+ puts $aFile "\t\t\t\t\t<Add option=\"-D_QNX_SOURCE\" />"
+ }
puts $aFile "\t\t\t\t\t<Add option=\"-DNo_Exception\" />"
puts $aFile "\t\t\t\t</Compiler>"
# Debug target configuration
puts $aFile "\t\t\t<Target title=\"Debug\">"
if { "$theIsExe" == "true" } {
- puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/bind/${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
+ puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/bind/${theProjName}\" prefix_auto=\"0\" extension_auto=\"0\" />"
puts $aFile "\t\t\t\t<Option type=\"1\" />"
} else {
if { "$aWokStation" == "wnt" } {
puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/libd/${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
} else {
- puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/libd/lib${theProjName}\" prefix_auto=\"1\" extension_auto=\"1\" />"
+ puts $aFile "\t\t\t\t<Option output=\"../../../${aWokStation}/cbp/libd/lib${theProjName}.so\" prefix_auto=\"0\" extension_auto=\"0\" />"
}
puts $aFile "\t\t\t\t<Option type=\"3\" />"
}
} else {
puts $aFile "\t\t\t\t<Option compiler=\"gcc\" />"
}
- puts $aFile "\t\t\t\t<Option createDefFile=\"1\" />"
- puts $aFile "\t\t\t\t<Option createStaticLib=\"1\" />"
+ puts $aFile "\t\t\t\t<Option createDefFile=\"0\" />"
+ puts $aFile "\t\t\t\t<Option createStaticLib=\"0\" />"
# compiler options per TARGET (including defines)
puts $aFile "\t\t\t\t<Compiler>"
puts $aFile "\t\t\t\t\t<Add option=\"-O0\" />"
puts $aFile "\t\t\t\t\t<Add option=\"-std=c++0x\" />"
puts $aFile "\t\t\t\t\t<Add option=\"-g\" />"
- puts $aFile "\t\t\t\t\t<Add option=\"-mmmx\" />"
- puts $aFile "\t\t\t\t\t<Add option=\"-msse\" />"
- puts $aFile "\t\t\t\t\t<Add option=\"-msse2\" />"
- puts $aFile "\t\t\t\t\t<Add option=\"-mfpmath=sse\" />"
+ if { "$aWokStation" != "qnx" } {
+ puts $aFile "\t\t\t\t\t<Add option=\"-mmmx\" />"
+ puts $aFile "\t\t\t\t\t<Add option=\"-msse\" />"
+ puts $aFile "\t\t\t\t\t<Add option=\"-msse2\" />"
+ puts $aFile "\t\t\t\t\t<Add option=\"-mfpmath=sse\" />"
+ }
}
foreach aMacro $theDefines {
puts $aFile "\t\t\t\t\t<Add option=\"-D${aMacro}\" />"
}
puts $aFile "\t\t\t\t\t<Add option=\"-D_DEBUG\" />"
+ if { "$aWokStation" == "qnx" } {
+ puts $aFile "\t\t\t\t\t<Add option=\"-D_QNX_SOURCE\" />"
+ }
puts $aFile "\t\t\t\t\t<Add option=\"-DDEB\" />"
puts $aFile "\t\t\t\t</Compiler>"
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-// AdvApp2Var_ApproxF2var.cxx
-#include <math.h>
#include <AdvApp2Var_SysBase.hxx>
#include <AdvApp2Var_MathBase.hxx>
#include <AdvApp2Var_Data_f2c.hxx>
#include <AdvApp2Var_Data.hxx>
#include <AdvApp2Var_ApproxF2var.hxx>
+#include <cmath>
static
int mmjacpt_(const integer *ndimen,
// AdvApp2Var_SysBase.cxx
#include <assert.h>
-#include <math.h>
+#include <cmath>
#include <stdlib.h>
#include <string.h>
#include <AdvApp2Var_Data_f2c.hxx>
// =======================================================================
Aspect_DisplayConnection::Aspect_DisplayConnection()
{
-#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__)
OSD_Environment anEnv ("DISPLAY");
myDisplayName = anEnv.Value();
Init();
// =======================================================================
Aspect_DisplayConnection::~Aspect_DisplayConnection()
{
-#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__)
if (myDisplay != NULL)
{
XCloseDisplay (myDisplay);
#endif
}
-#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__)
// =======================================================================
// function : Aspect_DisplayConnection
// purpose :
#include <TCollection_AsciiString.hxx>
#include <NCollection_DataMap.hxx>
-#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__)
#include <InterfaceGraphic.hxx>
#endif
//! Destructor. Close opened connection.
Standard_EXPORT ~Aspect_DisplayConnection();
-#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__)
//! Constructor. Creates connection with display specified in theDisplayName.
//! Display name should be in format "hostname:number" or "hostname:number.screen_number", where:
//! hostname - Specifies the name of the host machine on which the display is physically attached.
#ifndef _Aspect_FBConfig_HeaderFile
#define _Aspect_FBConfig_HeaderFile
-#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__)
typedef struct __GLXFBConfigRec* GLXFBConfig;
typedef GLXFBConfig Aspect_FBConfig; // GLXFBConfig* under UNIX
#else
#ifndef __Aspect_WNTXWD_HXX
# define __Aspect_WNTXWD_HXX
-#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__)
# include <X11/XWDFile.h>
# else
#elif defined(__ANDROID__) /* must be before Linux */
#include <android/api-level.h>
di << "OS: Android (__ANDROID_API__ = " << __ANDROID_API__ << ")\n";
+#elif defined(__QNXNTO__)
+ di << "OS: QNX Neutrino\n";
+#elif defined(__QNX__)
+ di << "OS: QNX\n";
#elif defined(__linux__)
di << "OS: Linux\n";
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
Standard_Real sht =
gp_Vec(Pos.Location (), P).Dot
(gp_Vec (Pos.YDirection())) / MinorRadius;
+
+#if __cplusplus >= 201103L
+ return std::asinh(sht);
+#else
return asinh(sht);
+#endif
}
//=======================================================================
{
gp_Vec2d V (Pos.YDirection().XY());
Standard_Real sht = gp_Vec2d(Pos.Location(),P).Dot(V) /MinorRadius;
- return asinh(sht);
+#if __cplusplus >= 201103L
+ return std::asinh(sht);
+#else
+ return asinh(sht);
+#endif
}
//=======================================================================
#undef DrawText
#endif
-#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
+#elif !defined(__ANDROID__) && !defined(__QNX__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
#include <stdio.h>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
+#ifndef _WIN32
+ #include <strings.h>
+#endif
+
//=======================================================================
//function : Constructor
//purpose : Empty constructor, defaulting to cerr
#include <OSD.hxx>
#include <Standard_Stream.hxx>
-#include <math.h>
+#include <cmath>
#include <stdio.h>
#if defined(isfinite)
# define finite isfinite
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
//=======================================================================
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;
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))
#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)
#include <signal.h>
-#if !defined(__ANDROID__)
+#if !defined(__ANDROID__) && !defined(__QNX__)
#include <sys/signal.h>
#endif
#include <OpenGL/gl.h>
#endif
#define __X_GL_H // prevent chaotic gl.h inclusions to avoid compile errors
-#elif defined(HAVE_GLES2) || defined(__ANDROID__)
+#elif defined(HAVE_GLES2) || defined(__ANDROID__) || defined(__QNX__)
#include <GLES2/gl2.h>
//#include <GLES3/gl3.h>
#else
#define GL_TEXTURE_BUFFER_ARB 0x8C2A
#endif
-#if defined(__ANDROID__)
+#if defined(__ANDROID__) || defined(__QNX__)
#define HAVE_EGL
#endif
#include <Xw_Window.hxx>
#endif
-#if !defined(_WIN32) && !defined(__ANDROID__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
+#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
#include <X11/Xlib.h> // XOpenDisplay()
#endif
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
#include <EGL/egl.h>
#endif
const Standard_Boolean theToInitialize)
: Graphic3d_GraphicDriver (theDisp),
myIsOwnContext (Standard_False),
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
myEglDisplay ((Aspect_Display )EGL_NO_DISPLAY),
myEglContext ((Aspect_RenderingContext )EGL_NO_CONTEXT),
myEglConfig (NULL),
myMapOfView (1, NCollection_BaseAllocator::CommonBaseAllocator()),
myMapOfStructure (1, NCollection_BaseAllocator::CommonBaseAllocator())
{
-#if !defined(_WIN32) && !defined(__ANDROID__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
+#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
if (myDisplayConnection.IsNull())
{
//Aspect_GraphicDeviceDefinitionError::Raise ("OpenGl_GraphicDriver: cannot connect to X server!");
aWindow->GetGlContext()->forcedRelease();
}
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
if (myIsOwnContext)
{
if (myEglContext != (Aspect_RenderingContext )EGL_NO_CONTEXT)
Standard_Boolean OpenGl_GraphicDriver::InitContext()
{
ReleaseContext();
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
-#if !defined(_WIN32) && !defined(__ANDROID__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
+#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
if (myDisplayConnection.IsNull())
{
return Standard_False;
return Standard_True;
}
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
// =======================================================================
// function : InitEglContext
// purpose :
void* theEglConfig)
{
ReleaseContext();
-#if !defined(_WIN32) && !defined(__ANDROID__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
+#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
if (myDisplayConnection.IsNull())
{
return Standard_False;
#else
NSView* TheSpecifiedWindowId = THEWindow->HView();
#endif
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) || defined(__QNX__)
int TheSpecifiedWindowId = -1;
#else
const Handle(Xw_Window) THEWindow = Handle(Xw_Window)::DownCast (AWindow);
#else
NSView* TheWindowIdOfView = theWindow->HView();
#endif
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) || defined(__QNX__)
int TheWindowIdOfView = 0;
#else
const Handle(Xw_Window) theWindow = Handle(Xw_Window)::DownCast (AspectWindow);
//! Perform initialization of default OpenGL context.
Standard_EXPORT Standard_Boolean InitContext();
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
//! Initialize default OpenGL context using existing one.
//! @param theEglDisplay EGL connection to the Display
//! @param theEglContext EGL rendering context
//! Could return NULL-handle if no window created by this driver.
Standard_EXPORT const Handle(OpenGl_Context)& GetSharedContext() const;
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
Aspect_Display getRawGlDisplay() const { return myEglDisplay; }
Aspect_RenderingContext getRawGlContext() const { return myEglContext; }
void* getRawGlConfig() const { return myEglConfig; }
protected:
Standard_Boolean myIsOwnContext; //!< indicates that shared context has been created within OpenGl_GraphicDriver
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
Aspect_Display myEglDisplay; //!< EGL connection to the Display : EGLDisplay
Aspect_RenderingContext myEglContext; //!< EGL rendering context : EGLContext
void* myEglConfig; //!< EGL configuration : EGLConfig
#include <TCollection_ExtendedString.hxx>
#include <Graphic3d_GraphicDriver.hxx>
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
#include <EGL/egl.h>
#endif
namespace
{
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
//
#elif defined(_WIN32)
Standard_Boolean isCoreProfile = Standard_False;
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
EGLDisplay anEglDisplay = (EGLDisplay )theDriver->getRawGlDisplay();
EGLContext anEglContext = (EGLContext )theDriver->getRawGlContext();
EGLConfig anEglConfig = (EGLConfig )theDriver->getRawGlConfig();
// release "GL" context if it is owned by window
// Mesa implementation can fail to destroy GL context if it set for current thread.
// It should be safer to unset thread GL context before its destruction.
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
if ((EGLSurface )myGlContext->myWindow != EGL_NO_SURFACE)
{
eglDestroySurface ((EGLDisplay )myGlContext->myDisplay,
// =======================================================================
void OpenGl_Window::Resize()
{
-#if !defined(_WIN32) && !defined(HAVE_EGL) && !defined(__ANDROID__)
+#if !defined(_WIN32) && !defined(HAVE_EGL) && !defined(__ANDROID__) && !defined(__QNX__)
Display* aDisp = (Display* )myGlContext->myDisplay;
if (aDisp == NULL)
return;
myWidth = aWidth;
myHeight = aHeight;
-#if !defined(_WIN32) && !defined(HAVE_EGL) && !defined(__ANDROID__)
+#if !defined(_WIN32) && !defined(HAVE_EGL) && !defined(__ANDROID__) && !defined(__QNX__)
XResizeWindow (aDisp, myGlContext->myWindow, (unsigned int )myWidth, (unsigned int )myHeight);
XSync (aDisp, False);
#endif
if (!Activate())
return;
-#if defined(HAVE_EGL) || defined(__ANDROID__)
+#if defined(HAVE_EGL) || defined(__ANDROID__) || defined(__QNX__)
eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_WIDTH, &myWidth);
eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_HEIGHT, &myHeight);
#elif defined(_WIN32)
#include <locale.h>
#endif
-#if defined(_MSC_VER) || defined(__ANDROID__)
+#if defined(_MSC_VER) || defined(__ANDROID__) || defined(__QNX__)
#include <malloc.h>
#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
#include <mm_malloc.h>
{
#if defined(_MSC_VER)
return _aligned_malloc (theSize, theAlign);
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) || defined(__QNX__)
return memalign (theAlign, theSize);
#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
return _mm_malloc (theSize, theAlign);
{
#if defined(_MSC_VER)
_aligned_free (thePtrAligned);
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) || defined(__QNX__)
free (thePtrAligned);
#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
_mm_free (thePtrAligned);
// glibc version for android platform use locale-independent implementation of
// strtod, strtol, strtoll functions. For other system with locale-depended
// implementations problems may appear if "C" locale is not set explicitly.
- #ifndef __ANDROID__
+ #if !defined(__ANDROID__) && !defined(__QNX__)
#error System does not support xlocale. Import/export could be broken if C locale did not specified by application.
#endif
#define strtod_l(thePtr, theNextPtr, theLocale) strtod(thePtr, theNextPtr)
#include <Standard_Assert.hxx>
#include <stdio.h>
+#include <errno.h>
#ifdef _WIN32
# include <windows.h>
#include <Standard_Mutex.hxx>
#include <Standard_OStream.hxx>
+#include <errno.h>
+
//=============================================
// Standard_Mutex::Standard_Mutex
//=============================================
#include <Standard_Boolean.hxx>
#include <Standard_ErrorHandlerCallback.hxx>
-#if (defined(_WIN32) || defined(__WIN32__))
+#if defined(_WIN32)
#include <windows.h>
#else
#include <pthread.h>
- #include <sys/errno.h>
+ ///#include <sys/errno.h>
#include <unistd.h>
#include <time.h>
#endif
#ifdef OCCT_DEBUG
cout << "Illegal agument in ATanh" << endl ;
#endif
- }
- return atanh(Value);
+ }
+#if __cplusplus >= 201103L
+ return std::atanh(Value);
+#else
+ return atanh(Value);
+#endif
}
//-------------------------------------------------------------------
#ifdef OCCT_DEBUG
cout << "Illegal agument in ACosh" << endl ;
#endif
- }
- return acosh(Value);
+ }
+#if __cplusplus >= 201103L
+ return std::acosh(Value);
+#else
+ return acosh(Value);
+#endif
}
//-------------------------------------------------------------------
#ifndef _Standard_Real_HeaderFile
#define _Standard_Real_HeaderFile
+#include <cmath>
#include <float.h>
-#include <math.h>
#include <Standard_values.h>
#include <Standard_math.hxx>
#include <Standard_TypeDef.hxx>
// ASinh : Returns the hyperbolic arc sine of a real
//-------------------------------------------------------------------
inline Standard_Real ASinh(const Standard_Real Value)
+#if __cplusplus >= 201103L
+{ return std::asinh(Value); }
+#else
{ return asinh(Value); }
+#endif
//-------------------------------------------------------------------
// Square : Returns a real to the power 2
#ifndef _Standard_ShortReal_HeaderFile
#define _Standard_ShortReal_HeaderFile
+#include <cmath>
#include <float.h>
-#include <math.h>
#include <Standard_values.h>
#include <Standard_TypeDef.hxx>
// - IsEqual
// ===============================================
+#ifndef __QNX__ // same as Standard_Size
+
// ------------------------------------------------------------------
// IsEqual : Returns Standard_True if two time values are equal
// ------------------------------------------------------------------
}
#endif
+
+#endif
#include <Xw_Window.hxx>
-#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__)
#include <Aspect_Convert.hxx>
#include <Aspect_WindowDefinitionError.hxx>
#ifndef _Xw_Window_H__
#define _Xw_Window_H__
-#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__QNX__)
#include <Aspect_Window.hxx>
#define No_Standard_DimensionError
//#endif
-#include <math.h>
+#include <cmath>
#include <math_Recipes.hxx>