Blame SOURCES/openexr-2.1.0-bigendian.patch

e28262
diff -up openexr-2.1.0/IlmImfTest/testFutureProofing.cpp.bigendian openexr-2.1.0/IlmImfTest/testFutureProofing.cpp
e28262
--- openexr-2.1.0/IlmImfTest/testFutureProofing.cpp.bigendian	2013-11-11 17:09:51.000000000 -0600
e28262
+++ openexr-2.1.0/IlmImfTest/testFutureProofing.cpp	2013-11-27 08:43:55.486026741 -0600
e28262
@@ -40,6 +40,7 @@
e28262
 #include <stdio.h>
e28262
 #include <stdlib.h>
e28262
 #include <assert.h>
e28262
+#include <byteswap.h>
e28262
 
e28262
 #include "tmpDir.h"
e28262
 #include "testFutureProofing.h"
e28262
@@ -64,6 +65,7 @@
e28262
 #include <ImfNamespace.h>
e28262
 #include <ImathNamespace.h>
e28262
 #include <IlmThreadNamespace.h>
e28262
+#include <ImfSystemSpecific.h>
e28262
 
e28262
 namespace IMF = OPENEXR_IMF_NAMESPACE;
e28262
 using namespace IMF;
e28262
@@ -1234,6 +1236,12 @@ modifyType (bool modify_version)
e28262
             
e28262
             //length of attribute
e28262
             fread(&length,4,1,f);
e28262
+            if (!GLOBAL_SYSTEM_LITTLE_ENDIAN)
e28262
+            {
e28262
+                int tmp = bswap_32(length);
e28262
+        	length = tmp;
e28262
+            }
e28262
+
e28262
             if(!modify_version && attrib_name=="type")
e28262
             {
e28262
                 // modify the type of part 1 to be 'X<whatevever>'
e28262
diff -up openexr-2.1.0/IlmImfTest/testMultiPartFileMixingBasic.cpp.bigendian openexr-2.1.0/IlmImfTest/testMultiPartFileMixingBasic.cpp
e28262
--- openexr-2.1.0/IlmImfTest/testMultiPartFileMixingBasic.cpp.bigendian	2013-11-11 17:09:52.000000000 -0600
e28262
+++ openexr-2.1.0/IlmImfTest/testMultiPartFileMixingBasic.cpp	2013-11-27 08:44:19.370775892 -0600
e28262
@@ -40,6 +40,7 @@
e28262
 #include <stdio.h>
e28262
 #include <stdlib.h>
e28262
 #include <assert.h>
e28262
+#include <byteswap.h>
e28262
 
e28262
 #include "tmpDir.h"
e28262
 #include "testMultiPartFileMixingBasic.h"
e28262
@@ -59,6 +60,7 @@
e28262
 #include <ImfDeepScanLineInputPart.h>
e28262
 #include <ImfPartType.h>
e28262
 #include <ImfMisc.h>
e28262
+#include <ImfSystemSpecific.h>
e28262
 
e28262
 namespace IMF = OPENEXR_IMF_NAMESPACE;
e28262
 using namespace IMF;
e28262
@@ -1383,6 +1385,11 @@ killOffsetTables (const std::string & fn
e28262
             
e28262
             //length of attribute
e28262
             fread(&length,4,1,f);
e28262
+    	    if (!GLOBAL_SYSTEM_LITTLE_ENDIAN)
e28262
+    	    {
e28262
+    		int tmp = bswap_32(length);
e28262
+    		length = tmp;
e28262
+    	    }
e28262
             
e28262
             //value of attribute
e28262
             for(int i=0;i