summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2011-12-07 19:07:39 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2011-12-07 19:07:39 +0000
commit1b709ec8690b8ef00d03d91297ec5a9000460270 (patch)
treed709e9a591863bce8c8a9e415aa406771f5261e6 /dev-util/bdelta/files/bdelta-0.2.3-libbdelta-rename-NDEBUG-to-DO_STATS_DEBUG.patch
parentAdd stow-1.3.3-r1 with fixed bug 246264 and new 2.1.1 version. Old version is... (diff)
downloadgentoo-2-1b709ec8690b8ef00d03d91297ec5a9000460270.tar.gz
gentoo-2-1b709ec8690b8ef00d03d91297ec5a9000460270.tar.bz2
gentoo-2-1b709ec8690b8ef00d03d91297ec5a9000460270.zip
Version bump. Fixes bug #338327 by Artem S. Tashkinov. Added myself to maintainers.
(Portage version: 2.2.0_alpha79_p23/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/bdelta/files/bdelta-0.2.3-libbdelta-rename-NDEBUG-to-DO_STATS_DEBUG.patch')
-rw-r--r--dev-util/bdelta/files/bdelta-0.2.3-libbdelta-rename-NDEBUG-to-DO_STATS_DEBUG.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/dev-util/bdelta/files/bdelta-0.2.3-libbdelta-rename-NDEBUG-to-DO_STATS_DEBUG.patch b/dev-util/bdelta/files/bdelta-0.2.3-libbdelta-rename-NDEBUG-to-DO_STATS_DEBUG.patch
new file mode 100644
index 000000000000..ca03ac1dc113
--- /dev/null
+++ b/dev-util/bdelta/files/bdelta-0.2.3-libbdelta-rename-NDEBUG-to-DO_STATS_DEBUG.patch
@@ -0,0 +1,65 @@
+From 3f2ac2dc56ed344dec1d2d38934682de2e326e49 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed, 7 Dec 2011 21:01:20 +0300
+Subject: [PATCH 3/4] libbdelta: rename NDEBUG to DO_STATS_DEBUG
+
+As it activates quite specific spam to stdout.
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ trunk/src/libbdelta.cpp | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/trunk/src/libbdelta.cpp b/trunk/src/libbdelta.cpp
+index 5808789..2a7e6e0 100644
+--- a/trunk/src/libbdelta.cpp
++++ b/trunk/src/libbdelta.cpp
+@@ -22,6 +22,9 @@ typedef uint16_t Token;
+ typedef uint32_t Token;
+ #endif
+
++// Enables delta chunk statistics
++// #define DO_STATS_DEBUG
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "container.h"
+@@ -171,7 +174,7 @@ void sortTMatches(DLink<Match> *place, PotentialMatch *matches, unsigned numMatc
+ std::sort(matches, matches + numMatches, DistanceFromP1(lastf1Place));
+ }
+
+-#ifndef NDEBUG
++#ifdef DO_STATS_DEBUG
+ long long stata = 0, statb = 0;
+ #endif
+ void findMatches(BDelta_Instance *b, Checksums_Instance *h, unsigned start, unsigned end,
+@@ -200,7 +203,7 @@ void findMatches(BDelta_Instance *b, Checksums_Instance *h, unsigned start, unsi
+ // Keep the best 16
+ sortTMatches(place, pMatch, pMatchCount);
+ pMatchCount = 16;
+-#ifndef NDEBUG
++#ifdef DO_STATS_DEBUG
+ ++statb;
+ #endif
+ }
+@@ -259,7 +262,7 @@ void findMatches(BDelta_Instance *b, Checksums_Instance *h, unsigned start, unsi
+ buf_loc = blocksize;
+ j += blocksize;
+ }
+-#ifndef NDEBUG
++#ifdef DO_STATS_DEBUG
+ ++stata;
+ #endif
+ break;
+@@ -415,7 +418,7 @@ unsigned bdelta_pass(void *instance, unsigned blocksize) {
+ delete unused;
+ delete h.htable;
+ delete h.checksums;
+-#ifndef NDEBUG
++#ifdef DO_STATS_DEBUG
+ printf("a = %.lli; b = %.lli\n", stata, statb);
+ #endif
+ // printf("Found %i matches\n", b->matches.size());
+--
+1.7.8
+