polygraph: 4.3.2 -> 4.11.0

authored by Piotr Bogdan and committed by Franz Pletz 322af6d8 de45b2d8

+3 -82
+3 -5
pkgs/tools/networking/polygraph/default.nix
··· 1 1 { stdenv, fetchurl, openssl, zlib, ncurses }: 2 2 3 3 stdenv.mkDerivation rec { 4 - name = "polygraph-4.3.2"; 4 + name = "polygraph-4.11.0"; 5 5 6 6 src = fetchurl { 7 7 url = "http://www.web-polygraph.org/downloads/srcs/${name}-src.tgz"; 8 - sha256 = "1fv9jpcicfsgsmghkykqif6l6w7nwvk5xbdmpv72jbrwzx44845h"; 8 + sha256 = "1ii60yl3p89qawvl19sd1bkpkw39fz8kpvmc3cawa32nxzbm9pbs"; 9 9 }; 10 10 11 11 buildInputs = [ openssl zlib ncurses ]; 12 12 13 - patches = [ ./fix_build.patch ]; 14 - 15 13 meta = with stdenv.lib; { 16 14 homepage = http://www.web-polygraph.org; 17 15 description = "Performance testing tool for caching proxies, origin server accelerators, L4/7 switches, content filters, and other Web intermediaries"; 18 16 platforms = platforms.linux; 19 17 maintainers = [ maintainers.lethalman ]; 20 18 }; 21 - } 19 + }
-77
pkgs/tools/networking/polygraph/fix_build.patch
··· 1 - Description: Fix ftbfs with GCC-4.7. 2 - Author: Mònica Ramírez Arceda <monica@debian.org> 3 - Bug-Debian: http://bugs.debian.org/667326 4 - Last-Update: 2012-05-11 5 - 6 - --- a/src/xstd/Heap.h 7 - +++ b/src/xstd/Heap.h 8 - @@ -23,7 +23,7 @@ 9 - const Item &top() const { return this->theItems[1]; } 10 - Item &at(int idx) { return this->theItems[idx+1]; } 11 - 12 - - void add(Item v) { append(v); floatUp(++theCnt); } 13 - + void add(Item v) { this->append(v); floatUp(++theCnt); } 14 - void skip() { this->theItems[1] = this->theItems[theCnt--]; this->theCount--; sinkDown(1); } 15 - Item shift() { const Item v = this->theItems[1]; skip(); return v; } 16 - 17 - --- a/src/xstd/Ring.h 18 - +++ b/src/xstd/Ring.h 19 - @@ -22,11 +22,11 @@ 20 - int size() const { return Array<Item>::size(); } 21 - bool empty() const { return this->theInOff <= this->theOutOff; } 22 - bool full() const { return count() >= this->theCapacity; } 23 - - const Item &top(int off = 0) const { return item((this->theOutOff+off) % this->theCapacity); } 24 - + const Item &top(int off = 0) const { return this->item((this->theOutOff+off) % this->theCapacity); } 25 - 26 - - Item &top(int off = 0) { return item((this->theOutOff+off) % this->theCapacity); } 27 - - void enqueue(Item i) { Assert(!full()); item(this->theInOff++ % this->theCapacity) = i; check(); } 28 - - Item dequeue() { return item(this->theOutOff++ % this->theCapacity); } 29 - + Item &top(int off = 0) { return this->item((this->theOutOff+off) % this->theCapacity); } 30 - + void enqueue(Item i) { Assert(!full()); this->item(this->theInOff++ % this->theCapacity) = i; check(); } 31 - + Item dequeue() { return this->item(this->theOutOff++ % this->theCapacity); } 32 - 33 - void reset() { this->theInOff = this->theOutOff = 0; } 34 - inline void resize(int aCap); 35 - --- a/src/runtime/StatPhase.cc 36 - +++ b/src/runtime/StatPhase.cc 37 - @@ -413,12 +413,12 @@ 38 - break; 39 - } 40 - } else { 41 - - static CompoundXactInfo &compound = *CompoundXactInfo::Create(); 42 - - compound.exchanges = 1; 43 - - compound.reqSize = reqSize; 44 - - compound.repSize = repSize; 45 - - compound.lifeTime = repTime; 46 - - compound.record(rec.theIsolated); 47 - + static CompoundXactInfo &compound2 = *CompoundXactInfo::Create(); 48 - + compound2.exchanges = 1; 49 - + compound2.reqSize = reqSize; 50 - + compound2.repSize = repSize; 51 - + compound2.lifeTime = repTime; 52 - + compound2.record(rec.theIsolated); 53 - } 54 - 55 - if (x->cookiesSent() > 0) 56 - --- a/src/cache/CacheEntryHash.cc 57 - +++ b/src/cache/CacheEntryHash.cc 58 - @@ -14,7 +14,7 @@ 59 - 60 - CacheEntryHash::CacheEntryHash(int aCapacity): theCount(0) { 61 - theCapacity = (aCapacity + aCapacity/3 + 7) | 1; 62 - - theIndex = new (CacheEntry*[theCapacity]); 63 - + theIndex = new (CacheEntry*[this->theCapacity]); 64 - memset(theIndex, 0, sizeof(CacheEntry*)*theCapacity); 65 - } 66 - 67 - --- a/src/tools/IntIntHash.cc 68 - +++ b/src/tools/IntIntHash.cc 69 - @@ -13,7 +13,7 @@ 70 - 71 - IntIntHash::IntIntHash(int aCapacity): theHashCap(0) { 72 - theHashCap = (aCapacity + aCapacity/3 + 7) | 1; 73 - - theIndex = new (IntIntHashItem*[theHashCap]); 74 - + theIndex = new (IntIntHashItem*[this->theHashCap]); 75 - memset(theIndex, 0, sizeof(IntIntHashItem*)*theHashCap); 76 - } 77 -