1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-16 10:54:53 +03:00

0027754: Configuration - fix compilation of Standard.cxx on non-x86 desktop systems

This commit is contained in:
kgv 2016-08-05 19:05:19 +00:00 committed by bugmaster
parent 9016c8bd2e
commit c58b1b6257

View File

@ -29,7 +29,7 @@
#if defined(_MSC_VER) || defined(__ANDROID__) || defined(__QNX__) #if defined(_MSC_VER) || defined(__ANDROID__) || defined(__QNX__)
#include <malloc.h> #include <malloc.h>
#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1) #elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1 && defined(__i386))
#include <mm_malloc.h> #include <mm_malloc.h>
#else #else
extern "C" int posix_memalign (void** thePtr, size_t theAlign, size_t theSize); extern "C" int posix_memalign (void** thePtr, size_t theAlign, size_t theSize);
@ -266,7 +266,7 @@ Standard_Address Standard::AllocateAligned (const Standard_Size theSize,
return _aligned_malloc (theSize, theAlign); return _aligned_malloc (theSize, theAlign);
#elif defined(__ANDROID__) || defined(__QNX__) #elif defined(__ANDROID__) || defined(__QNX__)
return memalign (theAlign, theSize); return memalign (theAlign, theSize);
#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1) #elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1 && defined(__i386))
return _mm_malloc (theSize, theAlign); return _mm_malloc (theSize, theAlign);
#else #else
void* aPtr; void* aPtr;
@ -289,7 +289,7 @@ void Standard::FreeAligned (Standard_Address thePtrAligned)
_aligned_free (thePtrAligned); _aligned_free (thePtrAligned);
#elif defined(__ANDROID__) || defined(__QNX__) #elif defined(__ANDROID__) || defined(__QNX__)
free (thePtrAligned); free (thePtrAligned);
#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1) #elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1 && defined(__i386))
_mm_free (thePtrAligned); _mm_free (thePtrAligned);
#else #else
free (thePtrAligned); free (thePtrAligned);