mirror of https://github.com/aria2/aria2
Fixed compile error on android (which does not LFS support)
parent
52155b1860
commit
deb0983ab4
|
@ -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)) {
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue