Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ext/curl: Cleanup config.w32 to remove superfluous checks and outdated comments #13684

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions ext/curl/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ if (PHP_CURL != "no") {
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) &&
!isNaN(ver_num) &&
(ver_num <= parseInt("0x073b00") || ver_num > parseInt("0x073b00") &&
CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))
Comment on lines -24 to -27
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was supposed to be:

		(ver_num <= parseInt("0x073b00")) || (ver_num > parseInt("0x073b00") &&
			CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
			CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
			CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))

But see #16787 for why I agree that dropping the check is fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Ok. Yes, there was also a comment about this change on the initial commit but never got addressed back then in 2018. Then fine to be removed.

(CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))
) {
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
ADD_FLAG("CFLAGS_CURL", "/D CURL_STATICLIB /D PHP_CURL_EXPORTS=1");
PHP_INSTALL_HEADERS("ext/curl", "php_curl.h");
// TODO: check for curl_version_info
} else {
WARNING("curl not enabled; libraries and headers not found");
}
Expand Down