[haiku-commits] haiku: hrev48022 - src/add-ons/translators/exr/openexr/imath

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 14 Oct 2014 23:28:03 +0200 (CEST)

hrev48022 adds 1 changeset to branch 'master'
old head: 839fef77e1da4ce7d9570d8766799f0f38016413
new head: 1431a56f3371270f08d20ca2e46a28418ac7ecd9
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=1431a56+%5E839fef7

----------------------------------------------------------------------------

1431a56: Temporary build fix for OpenEXR.
  
  * It seems hex floats are not allowed in C++.
  * I will fix this more cleanly, but it needs another rebuild of the gcc2
  package. Until then, this lets haiku compile.

                                 [ Adrien Destugues <pulkomandy@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev48022
Commit:      1431a56f3371270f08d20ca2e46a28418ac7ecd9
URL:         http://cgit.haiku-os.org/haiku/commit/?id=1431a56
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Tue Oct 14 21:25:10 2014 UTC

----------------------------------------------------------------------------

3 files changed, 8 insertions(+)
src/add-ons/translators/exr/openexr/imath/ImathLimits.h | 4 ++++
src/add-ons/translators/exr/openexr/imath/Jamfile       | 1 +
src/add-ons/translators/exr/openexr/imath/gcc2fix.c     | 3 +++

----------------------------------------------------------------------------

diff --git a/src/add-ons/translators/exr/openexr/imath/ImathLimits.h 
b/src/add-ons/translators/exr/openexr/imath/ImathLimits.h
index 683e990..ab2e9f5 100644
--- a/src/add-ons/translators/exr/openexr/imath/ImathLimits.h
+++ b/src/add-ons/translators/exr/openexr/imath/ImathLimits.h
@@ -46,6 +46,10 @@
 #include <float.h>
 #undef LDBL_EPSILON
 #define LDBL_EPSILON 2.2204460492503131e-16L
+#undef LDBL_MAX
+#undef LDBL_MIN
+extern "C" long double LDBL_MAX;
+extern "C" long double LDBL_MIN;
 #include <limits.h>
 
 //------------------------------------------
diff --git a/src/add-ons/translators/exr/openexr/imath/Jamfile 
b/src/add-ons/translators/exr/openexr/imath/Jamfile
index 3ae13ad..1480d42 100644
--- a/src/add-ons/translators/exr/openexr/imath/Jamfile
+++ b/src/add-ons/translators/exr/openexr/imath/Jamfile
@@ -19,6 +19,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
                        ImathRandom.cpp
                        ImathShear.cpp
                        ImathVec.cpp
+                       gcc2fix.c
                        ;
        }
 }
diff --git a/src/add-ons/translators/exr/openexr/imath/gcc2fix.c 
b/src/add-ons/translators/exr/openexr/imath/gcc2fix.c
new file mode 100644
index 0000000..1345b67
--- /dev/null
+++ b/src/add-ons/translators/exr/openexr/imath/gcc2fix.c
@@ -0,0 +1,3 @@
+// C++ doesn't handle hex floats properly...
+long double LDBL_MAX = 0xfffffffffffffffp16320l;
+long double LDBL_MIN = 0x1p-16382l;


Other related posts:

  • » [haiku-commits] haiku: hrev48022 - src/add-ons/translators/exr/openexr/imath - pulkomandy