diff options
author | Michael Vogt <mvo@debian.org> | 2014-04-01 13:57:22 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-04-01 13:57:22 +0200 |
commit | 8a1c9010137a8c49d9808f2db34b9ee277138986 (patch) | |
tree | 5ec5c0103cb896407d8c9542fac0ec8ab3313602 /apt-pkg/contrib/hashes.h | |
parent | fa55ccaa85ca8f85251300f5c5f574edc0c3ca71 (diff) | |
parent | 417e83d0d79637266e04c98189c62ce85bcdf737 (diff) |
Merge branch 'debian/sid' into ubuntu/master
Conflicts:
apt-pkg/deb/dpkgpm.cc
debian/apt.auto-removal.sh
debian/changelog
vendor/debian/sources.list.in
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, |