summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-10-07 13:42:50 +0200
committerMichael Vogt <mvo@debian.org>2013-10-07 13:42:50 +0200
commit3286ad136cbfdb73b97f880ba1ad19a2000781c5 (patch)
tree262a7cecb0d998ee9e4f44ae72a690d32b410eb8 /apt-pkg/contrib/fileutl.cc
parent0fa3c89c9e5c2c61a70c714ef8e4ac9d2b7d6ae1 (diff)
fix libapt-inst for >2G debs (closes: #725483)
Diffstat (limited to 'apt-pkg/contrib/fileutl.cc')
-rw-r--r--apt-pkg/contrib/fileutl.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 3966eb0ed..0261119ba 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -656,9 +656,9 @@ string flNoLink(string File)
while (1)
{
// Read the link
- int Res;
+ ssize_t Res;
if ((Res = readlink(NFile.c_str(),Buffer,sizeof(Buffer))) <= 0 ||
- (unsigned)Res >= sizeof(Buffer))
+ (size_t)Res >= sizeof(Buffer))
return File;
// Append or replace the previous path
@@ -1244,7 +1244,7 @@ FileFd::~FileFd()
gracefully. */
bool FileFd::Read(void *To,unsigned long long Size,unsigned long long *Actual)
{
- int Res;
+ ssize_t Res;
errno = 0;
if (Actual != 0)
*Actual = 0;
@@ -1344,7 +1344,7 @@ char* FileFd::ReadLine(char *To, unsigned long long const Size)
/* */
bool FileFd::Write(const void *From,unsigned long long Size)
{
- int Res;
+ ssize_t Res;
errno = 0;
do
{
@@ -1398,7 +1398,7 @@ bool FileFd::Write(const void *From,unsigned long long Size)
}
bool FileFd::Write(int Fd, const void *From, unsigned long long Size)
{
- int Res;
+ ssize_t Res;
errno = 0;
do
{
@@ -1471,14 +1471,14 @@ bool FileFd::Seek(unsigned long long To)
d->seekpos = To;
return true;
}
- int res;
+ off_t res;
#ifdef HAVE_ZLIB
if (d != NULL && d->gz)
res = gzseek(d->gz,To,SEEK_SET);
else
#endif
res = lseek(iFd,To,SEEK_SET);
- if (res != (signed)To)
+ if (res != (off_t)To)
return FileFdError("Unable to seek to %llu", To);
if (d != NULL)
@@ -1509,7 +1509,7 @@ bool FileFd::Skip(unsigned long long Over)
return true;
}
- int res;
+ off_t res;
#ifdef HAVE_ZLIB
if (d != NULL && d->gz != NULL)
res = gzseek(d->gz,Over,SEEK_CUR);