From d44e14e3f6bca5f9de41955939ef5027c077bd68 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 23 Mar 2015 18:37:41 +0300 Subject: [PATCH] 0025963: Define HashCode() for an unsigned int within armv7 target OSD_EnvironmentIterator - do not use _NSGetEnviron() on iOS. --- src/OSD/OSD_EnvironmentIterator.cxx | 12 ++++++++---- src/Standard/Standard_Integer.hxx | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/OSD/OSD_EnvironmentIterator.cxx b/src/OSD/OSD_EnvironmentIterator.cxx index fd5d346172..68e3d169e4 100644 --- a/src/OSD/OSD_EnvironmentIterator.cxx +++ b/src/OSD/OSD_EnvironmentIterator.cxx @@ -12,7 +12,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef WNT +#ifndef _WIN32 //---------- All Systems except windowsNT : ---------------------------------- @@ -21,10 +21,14 @@ //const OSD_WhoAmI Iam = OSD_WEnvironmentIterator; #ifdef __APPLE__ -#include -#define environ (*_NSGetEnviron()) + #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE + #include + #define environ (*_NSGetEnviron()) + #else + extern char **environ; + #endif #else -extern char **environ; + extern char **environ; #endif OSD_EnvironmentIterator::OSD_EnvironmentIterator(){ diff --git a/src/Standard/Standard_Integer.hxx b/src/Standard/Standard_Integer.hxx index 2207840523..674e1b3ca9 100755 --- a/src/Standard/Standard_Integer.hxx +++ b/src/Standard/Standard_Integer.hxx @@ -49,7 +49,7 @@ inline Standard_Boolean IsEqual (const Standard_Integer theOne, return theOne == theTwo; } -#if (defined(_LP64) || defined(__LP64__) || defined(_WIN64)) +#if (defined(_LP64) || defined(__LP64__) || defined(_WIN64)) || defined(__APPLE__) // ------------------------------------------------------------------ // Hascode : Computes a hascoding value for a given unsigned integer // ------------------------------------------------------------------