Files
MINGW-packages/mingw-w64-openexr/0001-mingw-w64-fix.patch
2018-11-05 18:45:26 +03:00

42 lines
1.1 KiB
Diff

--- a/OpenEXR/IlmImf/ImfSimd.h.orig 2013-11-25 23:49:53.000000000 +0400
+++ b/OpenEXR/IlmImf/ImfSimd.h 2013-12-28 11:32:14.071000000 +0400
@@ -44,8 +44,10 @@
// GCC and Visual Studio SSE2 compiler flags
-#if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE)
+#ifndef __MINGW64_VERSION_MAJOR
+ #if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE)
#define IMF_HAVE_SSE2 1
+ #endif
#endif
--- a/OpenEXR/IlmImf/ImfSystemSpecific.h.orig 2013-10-21 23:02:22.000000000 +0400
+++ b/OpenEXR/IlmImf/ImfSystemSpecific.h 2013-12-28 11:29:29.218600000 +0400
@@ -52,7 +52,23 @@
#ifdef IMF_HAVE_SSE2
-#if defined(__GNUC__)
+#ifdef __MINGW64_VERSION_MAJOR
+
+#define EXR_FORCEINLINE inline
+#define EXR_RESTRICT __restrict
+
+static void* EXRAllocAligned(size_t size, size_t alignment)
+{
+ __mingw_aligned_malloc(alignment, size);
+}
+
+
+static void EXRFreeAligned(void* ptr)
+{
+ __mingw_aligned_free(ptr);
+}
+
+#elif defined __GNUC__
// Causes issues on certain gcc versions
//#define EXR_FORCEINLINE inline __attribute__((always_inline))
#define EXR_FORCEINLINE inline