diff options
author | Sean Finney <seanius@debian.org> | 2009-06-24 22:49:04 +0200 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2009-06-24 22:49:04 +0200 |
commit | 84f4ca9b07fe5b73d840258f4aa7c1eb534c4253 (patch) | |
tree | 9829bd578af8a4a8b42b04277f9067e00dc5ad90 /ext/bz2 | |
parent | 6821b67124604da690c5e9276d5370d679c63ac8 (diff) | |
download | php-84f4ca9b07fe5b73d840258f4aa7c1eb534c4253.tar.gz |
Imported Upstream version 5.3.0~RC4upstream/5.3.0_RC4upstream/5.3.0.RC4
Diffstat (limited to 'ext/bz2')
-rw-r--r-- | ext/bz2/bz2.c | 10 | ||||
-rw-r--r-- | ext/bz2/config.w32 | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index ed58e6907..e7832a889 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2.c,v 1.14.2.3.2.12.2.11 2008/12/31 11:15:35 sebastian Exp $ */ +/* $Id: bz2.c,v 1.14.2.3.2.12.2.12 2009/05/15 17:28:08 kalle Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -495,7 +495,7 @@ static PHP_FUNCTION(bzcompress) + .01 x length of data + 600 which is the largest size the results of the compression could possibly be, at least that's what the libbz2 docs say (thanks to jeremy@nirvani.net for pointing this out). */ - dest_len = source_len + (0.01 * source_len) + 600; + dest_len = (unsigned int) (source_len + (0.01 * source_len) + 600); /* Allocate the destination buffer */ dest = emalloc(dest_len + 1); @@ -559,15 +559,15 @@ static PHP_FUNCTION(bzdecompress) /* compression is better then 2:1, need to allocate more memory */ bzs.avail_out = source_len; size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32; - dest = safe_erealloc(dest, 1, bzs.avail_out+1, size ); + dest = safe_erealloc(dest, 1, bzs.avail_out+1, (size_t) size ); bzs.next_out = dest + size; } if (error == BZ_STREAM_END || error == BZ_OK) { size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32; - dest = safe_erealloc(dest, 1, size, 1); + dest = safe_erealloc(dest, 1, (size_t) size, 1); dest[size] = '\0'; - RETVAL_STRINGL(dest, size, 0); + RETVAL_STRINGL(dest, (int) size, 0); } else { /* real error */ efree(dest); RETVAL_LONG(error); diff --git a/ext/bz2/config.w32 b/ext/bz2/config.w32 index 2df794056..598ae18d5 100644 --- a/ext/bz2/config.w32 +++ b/ext/bz2/config.w32 @@ -1,10 +1,10 @@ -// $Id: config.w32,v 1.4 2004/07/20 05:26:33 pollita Exp $ +// $Id: config.w32,v 1.4.6.1 2009/06/10 15:44:51 pajoye Exp $ // vim:ft=javascript ARG_WITH("bz2", "BZip2", "no"); if (PHP_BZ2 != "no") { - if (CHECK_LIB("libbz2.lib", "bz2", PHP_BZ2) && + if (CHECK_LIB("libbz2_a.lib;libbz2.lib", "bz2", PHP_BZ2) && CHECK_HEADER_ADD_INCLUDE("bzlib.h", "CFLAGS_BZ2")) { EXTENSION("bz2", "bz2.c bz2_filter.c"); AC_DEFINE('HAVE_BZ2', 1, 'Have BZ2 library'); |