summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:46:48 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:46:48 +0200
commit650faab01603caac04494d54cf6b10a65c00ea13 (patch)
treed89d9ec876c195d8f757e1351858ea7c200dd269 /apt-pkg/contrib/hashes.h
parentea54214002c09eeb4dd498d97a564471ec9993c5 (diff)
Support large files in the complete toolset. Indexes of this
size are pretty unlikely for now, but we need it for deb packages which could become bigger than 4GB now (LP: #815895)
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r--apt-pkg/contrib/hashes.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index e702fcca2..40c2ad064 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -62,14 +62,14 @@ class Hashes
SHA256Summation SHA256;
SHA512Summation SHA512;
- inline bool Add(const unsigned char *Data,unsigned long Size)
+ inline bool Add(const unsigned char *Data,unsigned long long Size)
{
return MD5.Add(Data,Size) && SHA1.Add(Data,Size) && SHA256.Add(Data,Size) && SHA512.Add(Data,Size);
};
inline bool Add(const char *Data) {return Add((unsigned char *)Data,strlen(Data));};
- inline bool AddFD(int const Fd,unsigned long Size = 0)
+ inline bool AddFD(int const Fd,unsigned long long Size = 0)
{ return AddFD(Fd, Size, true, true, true, true); };
- bool AddFD(int const Fd, unsigned long Size, bool const addMD5,
+ bool AddFD(int const Fd, unsigned long long Size, bool const addMD5,
bool const addSHA1, bool const addSHA256, bool const addSHA512);
inline bool Add(const unsigned char *Beg,const unsigned char *End)
{return Add(Beg,End-Beg);};