Skip to content

Commit 89db321

Browse files
committed
Refactor
We now can simplify `SETUP_ZLIB_LIB()`, and clean up formatting.
1 parent d13b9e9 commit 89db321

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

ext/mysqlnd/config.w32

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ if (PHP_MYSQLND != "no") {
3030
EXTENSION("mysqlnd", mysqlnd_source, false, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
3131
if (SETUP_ZLIB_LIB("mysqlnd", PHP_MYSQLND) &&
3232
CHECK_HEADER_ADD_INCLUDE("zlib.h", "CFLAGS", "..\\zlib;" + php_usual_include_suspects)
33-
)
34-
{
33+
) {
3534
AC_DEFINE("MYSQLND_COMPRESSION_ENABLED", 1, "Define to 1 if mysqlnd has compressed protocol support.");
3635
AC_DEFINE("MYSQLND_SSL_SUPPORTED", 1, "Define to 1 if mysqlnd core SSL is enabled.");
3736
if (CHECK_LIB("crypt32.lib", "mysqlnd")) {

win32/build/confutils.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3628,9 +3628,8 @@ function ADD_MAKEFILE_FRAGMENT(src_file)
36283628

36293629
function SETUP_ZLIB_LIB(target, path_to_check)
36303630
{
3631-
return ((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", target, path_to_check))) ||
3632-
(PHP_ZLIB_SHARED && CHECK_LIB("zlib_a.lib;zlib.lib", target, path_to_check)) ||
3633-
(PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED));
3631+
return ((PHP_ZLIB == "no" || PHP_ZLIB_SHARED) && CHECK_LIB("zlib_a.lib;zlib.lib", target, path_to_check)) ||
3632+
(PHP_ZLIB == "yes" && !PHP_ZLIB_SHARED);
36343633
}
36353634

36363635
function SETUP_OPENSSL(target, path_to_check, common_name, use_env, add_dir_part, add_to_flag_only)

0 commit comments

Comments
 (0)