Support large files in the complete toolset. Indexes of this
[ntk/apt.git] / apt-pkg / indexrecords.cc
index 10e154a..9326407 100644 (file)
@@ -3,15 +3,17 @@
 // $Id: indexrecords.cc,v 1.1.2.4 2003/12/30 02:11:43 mdz Exp $
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
+#include<config.h>
+
 #include <apt-pkg/indexrecords.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
-#include <apti18n.h>
 #include <sys/stat.h>
 #include <clocale>
 
+#include <apti18n.h>
                                                                        /*}}}*/
 string indexRecords::GetDist() const
 {
@@ -78,7 +80,7 @@ bool indexRecords::Load(const string Filename)                                /*{{{*/
 
       string Name;
       string Hash;
-      size_t Size;
+      unsigned long long Size;
       while (Start < End)
       {
         if (!parseSumData(Start, End, Name, Hash, Size))
@@ -145,7 +147,7 @@ vector<string> indexRecords::MetaKeys()                                     /*{{{*/
 }
                                                                        /*}}}*/
 bool indexRecords::parseSumData(const char *&Start, const char *End,   /*{{{*/
-                                  string &Name, string &Hash, size_t &Size)
+                                  string &Name, string &Hash, unsigned long long &Size)
 {
    Name = "";
    Hash = "";
@@ -182,7 +184,7 @@ bool indexRecords::parseSumData(const char *&Start, const char *End,        /*{{{*/
    if (EntryEnd == End)
       return false;
    
-   Size = strtol (Start, NULL, 10);
+   Size = strtoull (Start, NULL, 10);
       
    /* Skip over intermediate blanks */
    Start = EntryEnd;