mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
community/opencascade: add patch
This commit is contained in:
parent
072c3069e2
commit
0ed0499ea9
1 changed files with 52 additions and 0 deletions
52
community/opencascade/arm.patch
Normal file
52
community/opencascade/arm.patch
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
--- src/Standard/Standard.cxx.orig 2015-12-19 16:04:48.458582412 -0700
|
||||||
|
+++ src/Standard/Standard.cxx 2015-12-19 16:30:55.096052853 -0700
|
||||||
|
@@ -28,13 +28,7 @@
|
||||||
|
#include <locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined(_MSC_VER) || defined(__ANDROID__)
|
||||||
|
- #include <malloc.h>
|
||||||
|
-#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
|
||||||
|
- #include <mm_malloc.h>
|
||||||
|
-#else
|
||||||
|
- extern "C" int posix_memalign (void** thePtr, size_t theAlign, size_t theSize);
|
||||||
|
-#endif
|
||||||
|
+#include <malloc.h>
|
||||||
|
|
||||||
|
#ifndef OCCT_MMGT_OPT_DEFAULT
|
||||||
|
#define OCCT_MMGT_OPT_DEFAULT 0
|
||||||
|
@@ -263,20 +257,13 @@
|
||||||
|
Standard_Address Standard::AllocateAligned (const Standard_Size theSize,
|
||||||
|
const Standard_Size theAlign)
|
||||||
|
{
|
||||||
|
-#if defined(_MSC_VER)
|
||||||
|
- return _aligned_malloc (theSize, theAlign);
|
||||||
|
-#elif defined(__ANDROID__)
|
||||||
|
return memalign (theAlign, theSize);
|
||||||
|
-#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
|
||||||
|
- return _mm_malloc (theSize, theAlign);
|
||||||
|
-#else
|
||||||
|
void* aPtr;
|
||||||
|
if (posix_memalign (&aPtr, theAlign, theSize))
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return aPtr;
|
||||||
|
-#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
@@ -286,13 +273,5 @@
|
||||||
|
|
||||||
|
void Standard::FreeAligned (Standard_Address thePtrAligned)
|
||||||
|
{
|
||||||
|
-#if defined(_MSC_VER)
|
||||||
|
- _aligned_free (thePtrAligned);
|
||||||
|
-#elif defined(__ANDROID__)
|
||||||
|
- free (thePtrAligned);
|
||||||
|
-#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 1)
|
||||||
|
- _mm_free (thePtrAligned);
|
||||||
|
-#else
|
||||||
|
free (thePtrAligned);
|
||||||
|
-#endif
|
||||||
|
}
|
Loading…
Reference in a new issue