diff options
author | Andrey Hristov <andrey@php.net> | 2010-04-06 18:14:23 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-04-06 18:14:23 +0000 |
commit | 798103d4e03a7b995d302c0f8cd3902ce01c3836 (patch) | |
tree | 3818e5c68fe99bdeeac0d41c9b607805714b8a95 /ext/mysqlnd/mysqlnd_net.c | |
parent | dda0320c5cbb641d04a4088923752d0e6fa6f0db (diff) | |
download | php-git-798103d4e03a7b995d302c0f8cd3902ce01c3836.tar.gz |
Fix the Windows build (void* arithmetic) as well as --disable-zlib
build.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_net.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_net.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index 1587acf482..d88e20418c 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -448,6 +448,7 @@ static enum_func_status MYSQLND_METHOD(mysqlnd_net, decode)(zend_uchar * uncompressed_data, size_t uncompressed_data_len, const zend_uchar * const compressed_data, size_t compressed_data_len TSRMLS_DC) { +#ifdef MYSQLND_COMPRESSION_ENABLED int error; uLongf tmp_complen = uncompressed_data_len; DBG_ENTER("mysqlnd_net::decode"); @@ -458,6 +459,10 @@ MYSQLND_METHOD(mysqlnd_net, decode)(zend_uchar * uncompressed_data, size_t uncom DBG_INF_FMT("decompression NOT successful. error=%d Z_OK=%d Z_BUF_ERROR=%d Z_MEM_ERROR=%d", error, Z_OK, Z_BUF_ERROR, Z_MEM_ERROR); } DBG_RETURN(error == Z_OK? PASS:FAIL); +#else + DBG_ENTER("mysqlnd_net::decode"); + DBG_RETURN(FAIL); +#endif } /* }}} */ @@ -467,6 +472,7 @@ static enum_func_status MYSQLND_METHOD(mysqlnd_net, encode)(zend_uchar * compress_buffer, size_t compress_buffer_len, const zend_uchar * const uncompressed_data, size_t uncompressed_data_len TSRMLS_DC) { +#ifdef MYSQLND_COMPRESSION_ENABLED int error; uLongf tmp_complen = compress_buffer_len; DBG_ENTER("mysqlnd_net::encode"); @@ -478,6 +484,10 @@ MYSQLND_METHOD(mysqlnd_net, encode)(zend_uchar * compress_buffer, size_t compres DBG_INF_FMT("compression successful. compressed size=%d", tmp_complen); } DBG_RETURN(error == Z_OK? PASS:FAIL); +#else + DBG_ENTER("mysqlnd_net::encode"); + DBG_RETURN(FAIL); +#endif } /* }}} */ |