summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-10-10 12:59:14 +0200
committerAnatol Belski <ab@php.net>2017-10-10 12:59:14 +0200
commit30f121f9bc626a87795bba0df4049cb7e32153dd (patch)
treef60faca227ef7557586de1fd11caa6e0705d36c2 /win32
parentc8732b1c5f5e12c774b082f4703afb3f13aa8bd9 (diff)
parentd1fc9b425fb8fe8eddbb166a508a72d6fc4f6115 (diff)
downloadphp-git-30f121f9bc626a87795bba0df4049cb7e32153dd.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fix re2c version detection
Diffstat (limited to 'win32')
-rw-r--r--win32/build/confutils.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index a59e28b659..7e432709bc 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -2860,18 +2860,18 @@ function toolset_setup_project_tools()
RE2C = PATH_PROG('re2c');
if (RE2C) {
- var intvers, intmin;
- var pattern = /\./g;
-
- RE2CVERS = probe_binary(RE2C, "version");
+ var RE2CVERS = probe_binary(RE2C, "version");
STDOUT.WriteLine(' Detected re2c version ' + RE2CVERS);
if (RE2CVERS.match(/^\d+.\d+$/)) {
RE2CVERS += ".0";
}
- intvers = RE2CVERS.replace(pattern, '') - 0;
- intmin = MINRE2C.replace(pattern, '') - 0;
+ var hm = RE2CVERS.match(/(\d+)\.(\d+)\.(\d+)/);
+ var nm = MINRE2C.match(/(\d+)\.(\d+)\.(\d+)/);
+
+ var intvers = (hm[1]-0)*10000 + (hm[2]-0)*100 + (hm[3]-0);
+ var intmin = (nm[1]-0)*10000 + (nm[2]-0)*100 + (nm[3]-0);
if (intvers < intmin) {
STDOUT.WriteLine('WARNING: The minimum RE2C version requirement is ' + MINRE2C);