trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject svn commit: r984570 - in /trafficserver/traffic/trunk: build/zlib.m4 iocore/cache/RamCacheCLFUS.cc
Date Wed, 11 Aug 2010 20:33:36 GMT
Author: jesus
Date: Wed Aug 11 20:33:36 2010
New Revision: 984570

URL: http://svn.apache.org/viewvc?rev=984570&view=rev
Log:
we actually need the 'compressBound' feature in zlib, so check for that.  If no zlib, we have
no uLongf... we expect a uint32 anyway.

Modified:
    trafficserver/traffic/trunk/build/zlib.m4
    trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc

Modified: trafficserver/traffic/trunk/build/zlib.m4
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/build/zlib.m4?rev=984570&r1=984569&r2=984570&view=diff
==============================================================================
--- trafficserver/traffic/trunk/build/zlib.m4 (original)
+++ trafficserver/traffic/trunk/build/zlib.m4 Wed Aug 11 20:33:36 2010
@@ -88,7 +88,7 @@ if test "$enable_zlib" != "no"; then
         ;;
     esac
   fi
-  AC_CHECK_LIB(z, zlibVersion, [zlib_have_libs=1])
+  AC_CHECK_LIB(z, compressBound, [zlib_have_libs=1])
   if test "$zlib_have_libs" != "0"; then
     ATS_FLAG_HEADERS(zlib.h, [zlib_have_headers=1])
   fi

Modified: trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc?rev=984570&r1=984569&r2=984570&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc Wed Aug 11 20:33:36 2010
@@ -317,13 +317,13 @@ void RamCacheCLFUS::compress_entries(int
       break;
     {
       e->compressed_len = e->size;
-      uLongf l = 0;
+      uint32 l = 0;
       int ctype = cache_config_ram_cache_compress;
       switch (ctype) {
         default: goto Lcontinue;
-        case CACHE_COMPRESSION_FASTLZ: l = (uLongf)((double)e->len * 1.05 + 66); break;
+        case CACHE_COMPRESSION_FASTLZ: l = (uint32)((double)e->len * 1.05 + 66); break;
 #if ATS_HAS_LIBZ
-        case CACHE_COMPRESSION_LIBZ: l = compressBound(e->len); break;
+        case CACHE_COMPRESSION_LIBZ: l = (uint32)compressBound(e->len); break;
 #endif
 #if ATS_HAS_LZMA
         case CACHE_COMPRESSION_LIBLZMA: l = e->len; break;



Mime
View raw message