From 24aee36cb80bc739061cab49dc3c8fadda4a7327 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Thu, 16 Mar 2017 20:56:52 +0100 Subject: [PATCH 1/2] (Vagrantfile) add box to reproduce #304 --- Vagrantfile | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 3fa6f7b..5b17fa9 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -144,7 +144,30 @@ Vagrant.configure("2") do |config| end + # + # ubuntu xenial(16.04) box with PHP 7.1.3, V8 5.2 + # (to reproduce issue #304) + # + config.vm.define "xenial-v8-5.2" do |i| + i.vm.box = "ubuntu/xenial64" + i.vm.synced_folder ".", "/data/v8js" + + i.vm.provision "shell", inline: <<-SHELL + gpg --keyserver keys.gnupg.net --recv 7F438280EF8D349F + gpg --armor --export 7F438280EF8D349F | apt-key add - + + apt-get update + apt-get install -y software-properties-common gdb tmux git tig curl apache2-utils lcov + + add-apt-repository ppa:ondrej/php + add-apt-repository ppa:pinepain/libv8-5.2 + apt-get update + apt-get install -y php7.1-dev libv8-5.2-dbg libv8-5.2-dev + SHELL + end + + config.vm.provision "shell", inline: <<-SHELL - mkdir -p /data/build && chown vagrant:vagrant /data/build + mkdir -p /data/build && chown 1000:1000 /data/build SHELL end From ebdd866ae5eb9fcfcdf3f15f001ada02580eeb2a Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Thu, 16 Mar 2017 20:57:33 +0100 Subject: [PATCH 2/2] alias std::isfinite to isfinite, closes #304 --- php_v8js_macros.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/php_v8js_macros.h b/php_v8js_macros.h index f233ec3..559e506 100644 --- a/php_v8js_macros.h +++ b/php_v8js_macros.h @@ -33,6 +33,9 @@ /* php.h requires the isnan() macro, which is removed by c++ header, * work around: re-define the macro to std::isnan function */ #define isnan(a) std::isnan(a) + +/* likewise isfinite */ +#define isfinite(a) std::isfinite(a) #endif extern "C" {