summaryrefslogtreecommitdiff
path: root/apt-inst/contrib
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:32:52 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:32:52 +0100
commit71ecaad29d8066a494f516efc5efd80860653fe2 (patch)
treeb0769df88e2b6496f23e3d899aeb1c240a3488d9 /apt-inst/contrib
parenta865ed25fa54514224cf4d6f83dd9cf48b7ed02b (diff)
parent37adedc9d0b66eeae7efb88aebd08dfbc6e06f77 (diff)
merged from http://bzr.debian.org/bzr/apt/apt/debian-experimental2
Diffstat (limited to 'apt-inst/contrib')
-rw-r--r--apt-inst/contrib/arfile.cc8
-rw-r--r--apt-inst/contrib/arfile.h7
-rw-r--r--apt-inst/contrib/extracttar.cc5
-rw-r--r--apt-inst/contrib/extracttar.h9
4 files changed, 18 insertions, 11 deletions
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
index 8018f4d30..2dee1a40d 100644
--- a/apt-inst/contrib/arfile.cc
+++ b/apt-inst/contrib/arfile.cc
@@ -14,13 +14,17 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#include<config.h>
+
#include <apt-pkg/arfile.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
#include <stdlib.h>
- /*}}}*/
+
#include <apti18n.h>
+ /*}}}*/
struct ARArchive::MemberHeader
{
@@ -112,7 +116,7 @@ bool ARArchive::LoadHeaders()
{
unsigned int I = sizeof(Head.Name) - 1;
for (; Head.Name[I] == ' ' || Head.Name[I] == '/'; I--);
- Memb->Name = string(Head.Name,I+1);
+ Memb->Name = std::string(Head.Name,I+1);
}
// Account for the AR header alignment
diff --git a/apt-inst/contrib/arfile.h b/apt-inst/contrib/arfile.h
index 7f6c68302..2be1323d1 100644
--- a/apt-inst/contrib/arfile.h
+++ b/apt-inst/contrib/arfile.h
@@ -17,7 +17,8 @@
#include <string>
-#include <apt-pkg/fileutl.h>
+
+class FileFd;
class ARArchive
{
@@ -49,12 +50,12 @@ class ARArchive
struct ARArchive::Member
{
// Fields from the header
- string Name;
+ std::string Name;
unsigned long MTime;
unsigned long UID;
unsigned long GID;
unsigned long Mode;
- unsigned long Size;
+ unsigned long long Size;
// Location of the data.
unsigned long Start;
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index 01b6b3836..12919a7cd 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -16,8 +16,10 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
-#include <apt-pkg/extracttar.h>
+#include<config.h>
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/extracttar.h>
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/configuration.h>
@@ -28,6 +30,7 @@
#include <signal.h>
#include <fcntl.h>
#include <iostream>
+
#include <apti18n.h>
/*}}}*/
diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h
index 42f8ef534..8754e8dcc 100644
--- a/apt-inst/contrib/extracttar.h
+++ b/apt-inst/contrib/extracttar.h
@@ -15,11 +15,10 @@
#define PKGLIB_EXTRACTTAR_H
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/dirstream.h>
-#include <algorithm>
+#include <string>
-using std::min;
+class pkgDirStream;
class ExtractTar
{
@@ -38,7 +37,7 @@ class ExtractTar
int GZPid;
FileFd InFd;
bool Eof;
- string DecompressProg;
+ std::string DecompressProg;
// Fork and reap gzip
bool StartGzip();
@@ -48,7 +47,7 @@ class ExtractTar
bool Go(pkgDirStream &Stream);
- ExtractTar(FileFd &Fd,unsigned long Max,string DecompressionProgram);
+ ExtractTar(FileFd &Fd,unsigned long Max,std::string DecompressionProgram);
virtual ~ExtractTar();
};