Fixed compile error without BitTorrent and Metalink support

pull/4/head
Tatsuhiro Tsujikawa 2011-12-11 00:08:13 +09:00
parent 8fe92517d9
commit c8191700b1
2 changed files with 13 additions and 10 deletions

View File

@ -237,6 +237,14 @@ SRCS += XmlAttr.cc XmlAttr.h\
ParserStateMachine.h ParserStateMachine.h
endif # HAVE_SOME_XMLLIB endif # HAVE_SOME_XMLLIB
if HAVE_LIBXML2
SRCS += Xml2XmlParser.cc Xml2XmlParser.h
endif # HAVE_LIBXML2
if HAVE_LIBEXPAT
SRCS += ExpatXmlParser.cc ExpatXmlParser.h
endif # HAVE_LIBEXPAT
if ENABLE_XML_RPC if ENABLE_XML_RPC
SRCS += XmlRpcRequestParserController.cc XmlRpcRequestParserController.h\ SRCS += XmlRpcRequestParserController.cc XmlRpcRequestParserController.h\
XmlRpcRequestParserStateMachine.cc XmlRpcRequestParserStateMachine.h\ XmlRpcRequestParserStateMachine.cc XmlRpcRequestParserStateMachine.h\
@ -496,14 +504,6 @@ SRCS += Metalinker.cc Metalinker.h\
MetalinkPostDownloadHandler.cc MetalinkPostDownloadHandler.h\ MetalinkPostDownloadHandler.cc MetalinkPostDownloadHandler.h\
metalink_helper.cc metalink_helper.h metalink_helper.cc metalink_helper.h
if HAVE_LIBXML2
SRCS += Xml2XmlParser.cc Xml2XmlParser.h
endif # HAVE_LIBXML2
if HAVE_LIBEXPAT
SRCS += ExpatXmlParser.cc ExpatXmlParser.h
endif # HAVE_LIBEXPAT
endif # ENABLE_METALINK endif # ENABLE_METALINK
if !HAVE_ASCTIME_R if !HAVE_ASCTIME_R

View File

@ -1137,8 +1137,11 @@ void changeOption
} }
} }
if(option.defined(PREF_DIR) || option.defined(PREF_OUT)) { if(option.defined(PREF_DIR) || option.defined(PREF_OUT)) {
if(dctx->getFileEntries().size() == 1 && if(dctx->getFileEntries().size() == 1
!dctx->hasAttribute(bittorrent::BITTORRENT)) { #ifdef ENABLE_BITTORRENT
&& !dctx->hasAttribute(bittorrent::BITTORRENT)
#endif // ENABLE_BITTORRENT
) {
dctx->getFirstFileEntry()->setPath dctx->getFirstFileEntry()->setPath
(grOption->blank(PREF_OUT) ? A2STR::NIL : (grOption->blank(PREF_OUT) ? A2STR::NIL :
util::applyDir(grOption->get(PREF_DIR), grOption->get(PREF_OUT))); util::applyDir(grOption->get(PREF_DIR), grOption->get(PREF_OUT)));