Fixed compile error on android (which does not LFS support)

pull/8/head
Tatsuhiro Tsujikawa 2011-12-26 00:10:27 +09:00
parent 52155b1860
commit deb0983ab4
5 changed files with 7 additions and 7 deletions

View File

@ -399,7 +399,7 @@ int FtpConnection::receiveResponse()
# define ULONGLONG_SCANF "%Lu" # define ULONGLONG_SCANF "%Lu"
#endif // __MINGW32__ #endif // __MINGW32__
int FtpConnection::receiveSizeResponse(off_t& size) int FtpConnection::receiveSizeResponse(int64_t& size)
{ {
std::pair<int, std::string> response; std::pair<int, std::string> response;
if(bulkReceiveResponse(response)) { if(bulkReceiveResponse(response)) {

View File

@ -102,7 +102,7 @@ public:
bool sendRetr(); bool sendRetr();
int receiveResponse(); int receiveResponse();
int receiveSizeResponse(off_t& size); int receiveSizeResponse(int64_t& size);
// Returns status code of MDTM reply. If the status code is 213, parses // Returns status code of MDTM reply. If the status code is 213, parses
// time-val and store it in time. // time-val and store it in time.
// If a code other than 213 is returned, time is not touched. // If a code other than 213 is returned, time is not touched.

View File

@ -253,7 +253,7 @@ void SizeMetalinkParserStateV4::endElement
const char* nsUri, const char* nsUri,
const std::string& characters) const std::string& characters)
{ {
off_t size; int64_t size;
if(util::parseLLIntNoThrow(size, characters) && size >= 0 && if(util::parseLLIntNoThrow(size, characters) && size >= 0 &&
size <= std::numeric_limits<off_t>::max()) { size <= std::numeric_limits<off_t>::max()) {
psm->setFileLengthOfEntry(size); psm->setFileLengthOfEntry(size);

View File

@ -676,7 +676,7 @@ void computeHeadPieces
(std::vector<size_t>& indexes, (std::vector<size_t>& indexes,
const std::vector<SharedHandle<FileEntry> >& fileEntries, const std::vector<SharedHandle<FileEntry> >& fileEntries,
size_t pieceLength, size_t pieceLength,
int64_t head) off_t head)
{ {
if(head == 0) { if(head == 0) {
return; return;
@ -701,7 +701,7 @@ void computeTailPieces
(std::vector<size_t>& indexes, (std::vector<size_t>& indexes,
const std::vector<SharedHandle<FileEntry> >& fileEntries, const std::vector<SharedHandle<FileEntry> >& fileEntries,
size_t pieceLength, size_t pieceLength,
int64_t tail) off_t tail)
{ {
if(tail == 0) { if(tail == 0) {
return; return;
@ -726,7 +726,7 @@ void parsePrioritizePieceRange
(std::vector<size_t>& result, const std::string& src, (std::vector<size_t>& result, const std::string& src,
const std::vector<SharedHandle<FileEntry> >& fileEntries, const std::vector<SharedHandle<FileEntry> >& fileEntries,
size_t pieceLength, size_t pieceLength,
int64_t defaultSize) off_t defaultSize)
{ {
std::vector<size_t> indexes; std::vector<size_t> indexes;
std::vector<Scip> parts; std::vector<Scip> parts;

View File

@ -292,7 +292,7 @@ void parsePrioritizePieceRange
(std::vector<size_t>& result, const std::string& src, (std::vector<size_t>& result, const std::string& src,
const std::vector<SharedHandle<FileEntry> >& fileEntries, const std::vector<SharedHandle<FileEntry> >& fileEntries,
size_t pieceLength, size_t pieceLength,
int64_t defaultSize = 1048576LL /* 1MiB */); off_t defaultSize = 1048576 /* 1MiB */);
// Converts ISO/IEC 8859-1 string src to utf-8. // Converts ISO/IEC 8859-1 string src to utf-8.
std::string iso8859ToUtf8(const std::string& src); std::string iso8859ToUtf8(const std::string& src);