]> git.saurik.com Git - apt.git/blobdiff - ftparchive/multicompress.cc
merge with debian/experimental
[apt.git] / ftparchive / multicompress.cc
index 08853b0aa70644bc49f1208aa786526c94cce49d..bf0f858d99fd5732c1603c551d0029457ddc265c 100644 (file)
    ##################################################################### */
                                                                        /*}}}*/
 // 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));