[OpenImageIO/el6] Another PPC fix attempt.
Richard Shaw
hobbes1069 at fedoraproject.org
Tue Oct 1 21:13:18 UTC 2013
commit 3040001735cfaec1e58127c2d4d50b007ee08c01
Author: Richard M. Shaw <hobbes1069 at gmail.com>
Date: Tue Oct 1 16:13:07 2013 -0500
Another PPC fix attempt.
oiio-ppc.patch | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
---
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
+
More information about the scm-commits
mailing list