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