summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-04-01 12:28:56 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-04-01 12:28:56 +0200
commitbe20eef52da4b7f361333ea70a8d705a98ae779e (patch)
tree4177a110ce6b1335fc4b85d5e53b298a65661f39 /apt-pkg/contrib/hashes.h
parenta555cf8be53d8b5557f004ecbde8482a169b79f3 (diff)
parent21b3eac8f9ab8e12b43fa8998a5aa5465f29adc5 (diff)
Merge remote-tracking branch 'upstream/debian/sid' into feature/apt-manpage
Conflicts: cmdline/apt.cc
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r--apt-pkg/contrib/hashes.h17
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,