From ea54214002c09eeb4dd498d97a564471ec9993c5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Sep 2011 10:09:00 +0200 Subject: reorder includes: add if needed and include it at first --- methods/rred.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'methods/rred.cc') diff --git a/methods/rred.cc b/methods/rred.cc index 849973e1a..80fc98ac5 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -1,4 +1,6 @@ // Includes /*{{{*/ +#include + #include #include #include -- cgit v1.2.3 From 650faab01603caac04494d54cf6b10a65c00ea13 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Sep 2011 17:46:48 +0200 Subject: 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) --- methods/rred.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'methods/rred.cc') diff --git a/methods/rred.cc b/methods/rred.cc index 80fc98ac5..57d9a8437 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -256,7 +256,7 @@ RredMethod::State RredMethod::patchMMap(FileFd &Patch, FileFd &From, /*{{{*/ #ifdef _POSIX_MAPPED_FILES MMap ed_cmds(MMap::ReadOnly); if (Patch.gzFd() != NULL) { - unsigned long mapSize = Patch.Size(); + unsigned long long mapSize = Patch.Size(); DynamicMMap* dyn = new DynamicMMap(0, mapSize, 0); if (dyn->validData() == false) { delete dyn; -- cgit v1.2.3 From 8f3ba4e8708cb72be19dacc2af4f601ee5fea292 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 13:31:29 +0200 Subject: do not pollute namespace in the headers with using (Closes: #500198) --- methods/rred.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'methods/rred.cc') diff --git a/methods/rred.cc b/methods/rred.cc index bc941ed04..2a05acce1 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -472,7 +472,7 @@ bool RredMethod::Fetch(FetchItem *Itm) /*{{{*/ { Debug = _config->FindB("Debug::pkgAcquire::RRed", false); URI Get = Itm->Uri; - string Path = Get.Host + Get.Path; // To account for relative paths + std::string Path = Get.Host + Get.Path; // To account for relative paths FetchResult Res; Res.Filename = Itm->DestFile; @@ -525,7 +525,7 @@ bool RredMethod::Fetch(FetchItem *Itm) /*{{{*/ and use the access time from the "old" file */ struct stat BufBase, BufPatch; if (stat(Path.c_str(),&BufBase) != 0 || - stat(string(Path+".ed").c_str(),&BufPatch) != 0) + stat(std::string(Path+".ed").c_str(),&BufPatch) != 0) return _error->Errno("stat",_("Failed to stat")); struct utimbuf TimeBuf; -- cgit v1.2.3 From 472ff00ef2e48383805d281c6364ec27839e3f4d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 19:14:19 +0200 Subject: use forward declaration in headers if possible instead of includes --- methods/rred.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'methods/rred.cc') diff --git a/methods/rred.cc b/methods/rred.cc index 2a05acce1..ef00fcaa3 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3