Skip to content

Commit 371eb0f

Browse files
committed
Address minor issues related to OpenEXR.
- OpenEXR handling code could conceivably report an unwarranted error when handling OpenEXR files > 2 GB on some platforms (notably Windows or 32-bit systems). - Document that use of OpenEXR 3.0.0 or later requires compiler to explicitly claim C++11 support.
1 parent e13ab3e commit 371eb0f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

source/base/image/openexr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class POV_EXR_OStream : public Imf::OStream
103103
OPENEXR_INT64 tellp()
104104
{
105105
POV_LONG pos = os.tellg();
106-
if((int) pos == -1)
106+
if(pos == (POV_LONG)-1)
107107
throw POV_EXCEPTION(kFileDataErr, "Error while writing EXR output");
108108
return(pos);
109109
}
@@ -145,7 +145,7 @@ class POV_EXR_IStream : public Imf::IStream
145145
OPENEXR_INT64 tellg()
146146
{
147147
POV_LONG pos = is.tellg();
148-
if((int)pos == -1)
148+
if(pos == (POV_LONG)-1)
149149
throw POV_EXCEPTION(kFileDataErr, "Error while reading EXR file");
150150
return pos;
151151
}

unix/install.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,12 @@ recommanded to generate a fully-featured POV-Ray executable.
141141

142142
- When using Boost 1.65 or above, the compiler must conform to C++11 or later.
143143

144-
- OpenEXR version 3.0.0 or higher is currently not supported, nor even
145-
properly tested for. We hope to change this in the future, but fixing it is
146-
a bit more complicated.
144+
- Modern versions of certain libraries (notably Imath 3.0.0 or above, as used
145+
by OpenEXR 3.0.0 or above) require the compiler to explicitly identify as
146+
C++11-compliant (as opposed to just supporting C++11 features quietly or
147+
with warnings). If you are using any such libraries, you may need to specify
148+
`CXXFLAGS=...` accordingly when invoking the `configure` script (e.g.
149+
`configure CXXFLAGS="-std=c++11" ...` for gcc or clang).
147150

148151

149152
====================================================

0 commit comments

Comments
 (0)