summaryrefslogtreecommitdiff
path: root/ftparchive/multicompress.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:56:21 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:56:21 +0100
commit7cb543fb742a837c4931513674febaec5e4c1401 (patch)
treeddefe5b9329907818aa6eb3b593f555b29ccb869 /ftparchive/multicompress.cc
parentf6cb0880a4b5d31e398cceb2e2577b6b82f4fffb (diff)
parent71ecaad29d8066a494f516efc5efd80860653fe2 (diff)
merged from lp:~mvo/apt/mvo (that has all the changes from debian-experimental2) and resolved a bunch of conflicts
Diffstat (limited to 'ftparchive/multicompress.cc')
-rw-r--r--ftparchive/multicompress.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc
index 08853b0aa..bf0f858d9 100644
--- a/ftparchive/multicompress.cc
+++ b/ftparchive/multicompress.cc
@@ -14,18 +14,20 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
-#include "multicompress.h"
-
-#include <apti18n.h>
+#include <config.h>
+
#include <apt-pkg/strutl.h>
#include <apt-pkg/error.h>
#include <apt-pkg/md5.h>
-
+
#include <sys/types.h>
#include <sys/stat.h>
#include <utime.h>
#include <unistd.h>
-#include <iostream>
+#include <iostream>
+
+#include "multicompress.h"
+#include <apti18n.h>
/*}}}*/
using namespace std;
@@ -213,7 +215,7 @@ bool MultiCompress::Die()
// MultiCompress::Finalize - Finish up writing /*{{{*/
// ---------------------------------------------------------------------
/* This is only necessary for statistics reporting. */
-bool MultiCompress::Finalize(unsigned long &OutSize)
+bool MultiCompress::Finalize(unsigned long long &OutSize)
{
OutSize = 0;
if (Input == 0 || Die() == false)
@@ -381,7 +383,7 @@ bool MultiCompress::Child(int const &FD)
stash a hash of the data to use later. */
SetNonBlock(FD,false);
unsigned char Buffer[32*1024];
- unsigned long FileSize = 0;
+ unsigned long long FileSize = 0;
MD5Summation MD5;
while (1)
{
@@ -443,7 +445,7 @@ bool MultiCompress::Child(int const &FD)
// Compute the hash
MD5Summation OldMD5;
- unsigned long NewFileSize = 0;
+ unsigned long long NewFileSize = 0;
while (1)
{
int Res = read(CompFd,Buffer,sizeof(Buffer));