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