Another PPC fix attempt.
This commit is contained in:
parent
5907817269
commit
3040001735
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue