summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-02-18 22:34:38 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-02-18 22:34:38 +0900
commit7230fbd2f780023b269fc940a286cd064fbe98b2 (patch)
tree8e8aba0e732ab868574fda19db703162026e28b3 /src
parent5b62fa9ab1d8baff8400fd49c79218659edecb71 (diff)
Replaced HAVE_LIBZ with HAVE_ZLIB
Diffstat (limited to 'src')
-rw-r--r--src/FeatureConfig.cc6
-rw-r--r--src/HttpRequest.cc4
-rw-r--r--src/HttpResponse.cc8
-rw-r--r--src/HttpResponseCommand.cc8
-rw-r--r--src/HttpServerCommand.cc6
-rw-r--r--src/Makefile.am4
-rw-r--r--src/XmlRpcResponse.cc10
7 files changed, 23 insertions, 23 deletions
diff --git a/src/FeatureConfig.cc b/src/FeatureConfig.cc
index 01667a2b..d91e557f 100644
--- a/src/FeatureConfig.cc
+++ b/src/FeatureConfig.cc
@@ -89,11 +89,11 @@ const std::string FeatureConfig::FEATURE_FIREFOX3_COOKIE("Firefox3 Cookie");
# define XML_RPC_ENABLED false
#endif // !ENABLE_XML_RPC
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
# define GZIP_ENABLED true
-#else // !HAVE_LIBZ
+#else // !HAVE_ZLIB
# define GZIP_ENABLED false
-#endif // !HAVE_LIBZ
+#endif // !HAVE_ZLIB
#ifdef HAVE_SQLITE3
# define FIREFOX3_COOKIE_ENABLED true
diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc
index 2c0839cd..e4079a26 100644
--- a/src/HttpRequest.cc
+++ b/src/HttpRequest.cc
@@ -176,11 +176,11 @@ std::string HttpRequest::createRequest()
builtinHds.push_back(std::make_pair("Accept:", acceptTypes));
if(contentEncodingEnabled_) {
std::string acceptableEncodings;
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
if(acceptGzip_) {
acceptableEncodings += "deflate, gzip";
}
-#endif // HAVE_LIBZ
+#endif // HAVE_ZLIB
if(!acceptableEncodings.empty()) {
builtinHds.push_back
(std::make_pair("Accept-Encoding:", acceptableEncodings));
diff --git a/src/HttpResponse.cc b/src/HttpResponse.cc
index 61f8e878..a916f3a6 100644
--- a/src/HttpResponse.cc
+++ b/src/HttpResponse.cc
@@ -51,9 +51,9 @@
#include "AuthConfig.h"
#include "ChunkedDecodingStreamFilter.h"
#include "error_code.h"
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
# include "GZipDecodingStreamFilter.h"
-#endif // HAVE_LIBZ
+#endif // HAVE_ZLIB
namespace aria2 {
@@ -203,12 +203,12 @@ const std::string& HttpResponse::getContentEncoding() const
SharedHandle<StreamFilter> HttpResponse::getContentEncodingStreamFilter() const
{
SharedHandle<StreamFilter> filter;
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
if(getContentEncoding() == HttpHeader::GZIP ||
getContentEncoding() == HttpHeader::DEFLATE) {
filter.reset(new GZipDecodingStreamFilter());
}
-#endif // HAVE_LIBZ
+#endif // HAVE_ZLIB
return filter;
}
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index aa7afd42..26523f52 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -72,9 +72,9 @@
#include "ChunkedDecodingStreamFilter.h"
#include "uri.h"
#include "SocketRecvBuffer.h"
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
# include "GZipDecodingStreamFilter.h"
-#endif // HAVE_LIBZ
+#endif // HAVE_ZLIB
namespace aria2 {
@@ -447,7 +447,7 @@ namespace {
bool decideFileAllocation
(const SharedHandle<StreamFilter>& filter)
{
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
for(SharedHandle<StreamFilter> f = filter; f; f = f->getDelegate()){
// Since the compressed file's length are returned in the response header
// and the decompressed file size is unknown at this point, disable file
@@ -456,7 +456,7 @@ bool decideFileAllocation
return false;
}
}
-#endif // HAVE_LIBZ
+#endif // HAVE_ZLIB
return true;
}
} // namespace
diff --git a/src/HttpServerCommand.cc b/src/HttpServerCommand.cc
index 92b465ac..cf1ab35e 100644
--- a/src/HttpServerCommand.cc
+++ b/src/HttpServerCommand.cc
@@ -66,11 +66,11 @@ HttpServerCommand::HttpServerCommand
e_->addSocketForReadCheck(socket_, this);
httpServer_->setUsernamePassword(e_->getOption()->get(PREF_XML_RPC_USER),
e_->getOption()->get(PREF_XML_RPC_PASSWD));
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
httpServer_->enableGZip();
-#else // !HAVE_LIBZ
+#else // !HAVE_ZLIB
httpServer_->disableGZip();
-#endif // !HAVE_LIBZ
+#endif // !HAVE_ZLIB
checkSocketRecvBuffer();
}
diff --git a/src/Makefile.am b/src/Makefile.am
index e657310a..83a57781 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -270,11 +270,11 @@ SRCS += LibsslTLSContext.cc LibsslTLSContext.h\
LibsslDHKeyExchange.cc LibsslDHKeyExchange.h
endif # HAVE_LIBSSL
-if HAVE_LIBZ
+if HAVE_ZLIB
SRCS += GZipDecoder.cc GZipDecoder.h\
GZipEncoder.cc GZipEncoder.h\
GZipDecodingStreamFilter.cc GZipDecodingStreamFilter.h
-endif # HAVE_LIBZ
+endif # HAVE_ZLIB
if HAVE_SQLITE3
SRCS += Sqlite3CookieParser.cc Sqlite3CookieParser.h\
diff --git a/src/XmlRpcResponse.cc b/src/XmlRpcResponse.cc
index a4d586f0..6cd47afc 100644
--- a/src/XmlRpcResponse.cc
+++ b/src/XmlRpcResponse.cc
@@ -38,9 +38,9 @@
#include <sstream>
#include "util.h"
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
# include "GZipEncoder.h"
-#endif // HAVE_LIBZ
+#endif // HAVE_ZLIB
namespace aria2 {
@@ -140,13 +140,13 @@ XmlRpcResponse& XmlRpcResponse::operator=(const XmlRpcResponse& c)
std::string XmlRpcResponse::toXml(bool gzip) const
{
if(gzip) {
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
GZipEncoder o;
o.init();
return encodeAll(o, code, param);
-#else // !HAVE_LIBZ
+#else // !HAVE_ZLIB
abort();
-#endif // !HAVE_LIBZ
+#endif // !HAVE_ZLIB
} else {
std::stringstream o;
return encodeAll(o, code, param);