diff options
author | Michael Vogt <mvo@debian.org> | 2014-03-14 09:02:44 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-03-14 09:02:44 +0100 |
commit | 83b880c6505a20247239d897b7387bba37942993 (patch) | |
tree | 11a23275548175e301f6fefda20a6a8bb6fe6de8 /apt-pkg/contrib/hashes.h | |
parent | f98d9bd2adf4f24a72d973f5752b47987843984c (diff) | |
parent | 40f8a8ba8c2e7ff9ce80781250c863c07ac130dd (diff) |
fix test/integration/test-apt-helper
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r-- | apt-pkg/contrib/hashes.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 0a8bcd259..5cd1af03b 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -17,17 +17,22 @@ #include <apt-pkg/md5.h> #include <apt-pkg/sha1.h> #include <apt-pkg/sha2.h> -#include <apt-pkg/fileutl.h> -#include <algorithm> -#include <vector> #include <cstring> - +#include <string> #ifndef APT_8_CLEANER_HEADERS using std::min; using std::vector; #endif +#ifndef APT_10_CLEANER_HEADERS +#include <apt-pkg/fileutl.h> +#include <algorithm> +#include <vector> +#endif + + +class FileFd; // helper class that contains hash function name // and hash @@ -61,7 +66,7 @@ class HashString bool empty() const; // return the list of hashes we support - static const char** SupportedHashes(); + static APT_CONST const char** SupportedHashes(); }; class Hashes @@ -77,7 +82,7 @@ class Hashes { 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 Add(const char *Data) {return Add((unsigned char const *)Data,strlen(Data));}; 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 long Size, bool const addMD5, |