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