From 3040001735cfaec1e58127c2d4d50b007ee08c01 Mon Sep 17 00:00:00 2001 From: Richard M. Shaw Date: Oct 01 2013 21:13:07 +0000 Subject: Another PPC fix attempt. --- diff --git a/oiio-ppc.patch b/oiio-ppc.patch index fabf323..918d5d4 100644 --- a/oiio-ppc.patch +++ b/oiio-ppc.patch @@ -16,7 +16,7 @@ diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/i #elif defined(_MSC_VER) // Windows return _InterlockedExchangeAdd ((volatile LONG *)at, x); -+#elif defined (__powerpc__) || defined (__PPC__) ++#elif defined (__powerpc__) + long long r; + r = *at; + *at += x; @@ -28,7 +28,7 @@ diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/i # else return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x); # endif -+#elif defined (__powerpc__) || defined (__PPC__) ++#elif defined (__powerpc__) + long long r; + r = *at; + *at += x; @@ -40,7 +40,7 @@ diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/i return a->compare_and_swap (newval, compareval) == newval; #elif defined(_MSC_VER) return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval); -+#elif defined(__powerpc__) || defined (__PPC__) ++#elif defined(__powerpc__) + return ((*at == compareval) ? (*at = newval), 1 : 0); #else # error No atomics on this platform. @@ -49,8 +49,19 @@ diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/i return a->compare_and_swap (newval, compareval) == newval; #elif defined(_MSC_VER) return (_InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval); -+#elif defined(__powerpc__) || defined(__PPC__) ++#elif defined(__PPC__) + return ((*at == compareval) ? (*at = newval), 1 : 0); #else # error No atomics on this platform. #endif +diff -Naur oiio-Release-1.2.1.orig/src/bmp.imageio/bmp_pvt.h oiio-Release-1.2.1/src/bmp.imageio/bmp_pvt.h +--- oiio-Release-1.2.1.orig/src/bmp.imageio/bmp_pvt.h 2013-08-06 00:10:31.000000000 -0500 ++++ oiio-Release-1.2.1/src/bmp.imageio/bmp_pvt.h 2013-10-01 16:10:19.546711936 -0500 +@@ -34,6 +34,7 @@ + #include "imageio.h" + #include "filesystem.h" + #include "fmath.h" ++#include "thread.h" + + OIIO_PLUGIN_NAMESPACE_BEGIN +