Skip to content

Commit d4103b3

Browse files
authored
Remove superfluous determination of cURL version (GH-16787)
This was originally meant to distinguish between libcurl 7.59.0 and earlier; only the latter would need to be linked against normalize.lib, libssh2.lib and nghttp2.lib[1]. That would only have catered to our builds, and might not have been correct anyway. However, the version check was wrong (paren error), and has been removed in the meantime[2]. Given that cURL 7.59.0 is rather old, we do not reinstate the version check, but rather drop the now superfluous (and improper) determination of the cURL version. A nice bonus is that we get rid of some global variables. [1] <a1ba300> [2] <94a12d5>
1 parent 3815a77 commit d4103b3

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

ext/curl/config.w32

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,13 @@
33
ARG_WITH("curl", "cURL support", "no");
44

55
if (PHP_CURL != "no") {
6-
var ver_num = NaN;
7-
var f = PHP_PHP_BUILD + "/include/curl/curlver.h";
8-
if (FSO.FileExists(f)) {
9-
var reg = /LIBCURL_VERSION_NUM\s+(0x[a-z0-9]+)/gi;
10-
var m = reg.exec(file_get_contents(PHP_PHP_BUILD + "/include/curl/curlver.h"));
11-
if (!!m && m.length >= 2) {
12-
ver_num = parseInt(m[1]);
13-
}
14-
}
15-
166
if (CHECK_LIB("libcurl_a.lib;libcurl.lib", "curl", PHP_CURL) &&
177
CHECK_HEADER_ADD_INCLUDE("curl/easy.h", "CFLAGS_CURL") &&
188
SETUP_OPENSSL("curl", PHP_CURL) >= 2 &&
199
CHECK_LIB("winmm.lib", "curl", PHP_CURL) &&
2010
CHECK_LIB("wldap32.lib", "curl", PHP_CURL) &&
2111
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
2212
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) &&
23-
!isNaN(ver_num) &&
2413
(CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
2514
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
2615
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))

0 commit comments

Comments
 (0)