[packages/hhvm] - fix isnan/isinf c++ usage - rel 5

baggins baggins at pld-linux.org
Sat May 28 13:52:24 CEST 2016


commit 83ff8dfd7c1299ef1c70570144e097c60550cb3d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat May 28 11:52:08 2016 +0000

    - fix isnan/isinf c++ usage
    - rel 5

 cxx.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 hhvm.spec |  4 +++-
 2 files changed, 50 insertions(+), 1 deletion(-)
---
diff --git a/hhvm.spec b/hhvm.spec
index 52b33d1..781decf 100644
--- a/hhvm.spec
+++ b/hhvm.spec
@@ -34,7 +34,7 @@ Name:		hhvm
 # we prefer LTS versions
 # see http://hhvm.com/blog/6083/hhvm-long-term-support
 Version:	3.3.7
-Release:	4
+Release:	5
 License:	PHP 3.01 and BSD
 Group:		Development/Languages
 Source0:	https://github.com/facebook/hhvm/archive/HHVM-%{version}.tar.gz
@@ -54,6 +54,7 @@ Patch4:		system-thirdparty.patch
 Patch5:		cmake.patch
 Patch6:		libvpx2.patch
 Patch7:		gcc5.patch
+Patch8:		cxx.patch
 URL:		https://github.com/facebook/hhvm/wiki
 BuildRequires:	ImageMagick-devel
 BuildRequires:	a52dec-libs-devel
@@ -262,6 +263,7 @@ mv folly-* third-party/folly/src
 #%patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 # prefer ones from system
 rm CMake/FindBISON.cmake
diff --git a/cxx.patch b/cxx.patch
new file mode 100644
index 0000000..2640102
--- /dev/null
+++ b/cxx.patch
@@ -0,0 +1,47 @@
+--- hhvm-HHVM-3.3.7/hphp/runtime/base/zend-printf.cpp~	2015-06-30 19:56:17.000000000 +0000
++++ hhvm-HHVM-3.3.7/hphp/runtime/base/zend-printf.cpp	2016-05-28 11:15:58.027477275 +0000
+@@ -40,11 +40,9 @@
+ #endif
+ #endif
+ 
+-#ifdef __CYGWIN__
+ #include <cmath>
+ #define isinf std::isinf
+ #define isnan std::isnan
+-#endif
+ 
+ namespace HPHP {
+ 
+--- hhvm-HHVM-3.3.7/hphp/runtime/ext/ext_math.cpp~	2015-06-30 19:56:17.000000000 +0000
++++ hhvm-HHVM-3.3.7/hphp/runtime/ext/ext_math.cpp	2016-05-28 11:27:25.647826412 +0000
+@@ -138,8 +138,8 @@
+ }
+ 
+ bool f_is_finite(double val) { return finite(val);}
+-bool f_is_infinite(double val) { return isinf(val);}
+-bool f_is_nan(double val) { return isnan(val);}
++bool f_is_infinite(double val) { return std::isinf(val);}
++bool f_is_nan(double val) { return std::isnan(val);}
+ 
+ Variant f_ceil(const Variant& number) {
+   int64_t ival;
+--- hhvm-HHVM-3.3.7/hphp/runtime/ext_zend_compat/php-src/main/php_config-linux.h~	2015-06-30 19:56:17.000000000 +0000
++++ hhvm-HHVM-3.3.7/hphp/runtime/ext_zend_compat/php-src/main/php_config-linux.h	2016-05-28 11:31:16.111870673 +0000
+@@ -2446,7 +2446,7 @@
+ 
+ #ifndef zend_isnan
+ #ifdef HAVE_ISNAN
+-#define zend_isnan(a) isnan(a)
++#define zend_isnan(a) std::isnan(a)
+ #elif defined(HAVE_FPCLASS)
+ #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
+ #else
+@@ -2455,7 +2455,7 @@
+ #endif
+ 
+ #ifdef HAVE_ISINF
+-#define zend_isinf(a) isinf(a)
++#define zend_isinf(a) std::isinf(a)
+ #elif defined(INFINITY)
+ /* Might not work, but is required by ISO C99 */
+ #define zend_isinf(a) (((a)==INFINITY)?1:0)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/hhvm.git/commitdiff/83ff8dfd7c1299ef1c70570144e097c60550cb3d



More information about the pld-cvs-commit mailing list