summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-inst/contrib/arfile.cc6
-rw-r--r--apt-pkg/contrib/fileutl.cc16
-rw-r--r--debian/changelog4
3 files changed, 15 insertions, 11 deletions
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
index d7ee528ba..9d84c1784 100644
--- a/apt-inst/contrib/arfile.cc
+++ b/apt-inst/contrib/arfile.cc
@@ -64,7 +64,7 @@ ARArchive::~ARArchive()
byte plain text header then the file data, another header, data, etc */
bool ARArchive::LoadHeaders()
{
- signed long Left = File.Size();
+ off_t Left = File.Size();
// Check the magic byte
char Magic[8];
@@ -123,7 +123,7 @@ bool ARArchive::LoadHeaders()
}
// Account for the AR header alignment
- unsigned Skip = Memb->Size % 2;
+ off_t Skip = Memb->Size % 2;
// Add it to the list
Memb->Next = List;
@@ -131,7 +131,7 @@ bool ARArchive::LoadHeaders()
Memb->Start = File.Tell();
if (File.Skip(Memb->Size + Skip) == false)
return false;
- if (Left < (signed)(Memb->Size + Skip))
+ if (Left < (off_t)(Memb->Size + Skip))
return _error->Error(_("Archive is too short"));
Left -= Memb->Size + Skip;
}
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);
diff --git a/debian/changelog b/debian/changelog
index 6e31784f2..86d2197c1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,11 @@
apt (0.9.11.5) UNRELEASED; urgency=low
+ [ Christian Perrier ]
* Fix typo in apt-private/private-show.cc. Thanks to Benjamin
Keresa. Closes: #724073
+
+ [ Mark Hymers ]
+ * fix libapt-inst for >2G debs (closes: #725483)
-- Christian Perrier <bubulle@debian.org> Mon, 23 Sep 2013 07:05:34 +0200