X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/7db98ffceda347f0bc457c6bdc4ff33d60e26b18..cce08fb5aca7dd01706cecea845b183dc62b1717:/apt-inst/contrib/extracttar.cc diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 4c29757ab..8a535967f 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -16,9 +16,6 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#ifdef __GNUG__ -#pragma implementation "apt-pkg/extracttar.h" -#endif #include #include @@ -136,7 +133,8 @@ bool ExtractTar::StartGzip() const char *Args[3]; string confvar = string("dir::bin::") + DecompressProg; - Args[0] = _config->Find(confvar.c_str(),DecompressProg.c_str()).c_str(); + string argv0 = _config->Find(confvar.c_str(),DecompressProg.c_str()); + Args[0] = argv0.c_str(); Args[1] = "-d"; Args[2] = 0; execvp(Args[0],(char **)Args); @@ -192,7 +190,7 @@ bool ExtractTar::Go(pkgDirStream &Stream) return Done(true); if (NewSum != CheckSum) - return _error->Error(_("Tar Checksum failed, archive corrupted")); + return _error->Error(_("Tar checksum failed, archive corrupted")); // Decode all of the fields pkgDirStream::Item Itm; @@ -309,7 +307,7 @@ bool ExtractTar::Go(pkgDirStream &Stream) while (Size != 0) { unsigned char Junk[32*1024]; - unsigned long Read = MIN(Size,sizeof(Junk)); + unsigned long Read = min(Size,(unsigned long)sizeof(Junk)); if (InFd.Read(Junk,((Read+511)/512)*512) == false) return false;