haskell-bloomfilter: patch to fix build on 32 bit platforms
This commit is contained in:
parent
66563862ec
commit
2b71e4643e
@ -1013,4 +1013,7 @@ self: super: {
|
||||
# https://github.com/GaloisInc/DSA/issues/1
|
||||
DSA = dontCheck super.DSA;
|
||||
|
||||
# https://github.com/bos/bloomfilter/issues/7
|
||||
bloomfilter = appendPatch super.bloomfilter ./patches/bloomfilter-fix-on-32bit.patch;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 35d972b3dc5056110d55315f2256d9c5046299c7 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Simons <simons@cryp.to>
|
||||
Date: Tue, 1 Sep 2015 17:58:36 +0200
|
||||
Subject: [PATCH] Revert "Fix maximum sizing calculation."
|
||||
|
||||
This reverts commit 44b01ba38b4fcdb5a85f44fa2f3af1f29cde8f40. The change breaks
|
||||
this package on 32 bit platforms. See https://github.com/bos/bloomfilter/issues/7
|
||||
for further details.
|
||||
---
|
||||
Data/BloomFilter/Easy.hs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Data/BloomFilter/Easy.hs b/Data/BloomFilter/Easy.hs
|
||||
index 5143c6e..a349168 100644
|
||||
--- a/Data/BloomFilter/Easy.hs
|
||||
+++ b/Data/BloomFilter/Easy.hs
|
||||
@@ -72,7 +72,7 @@ safeSuggestSizing capacity errRate
|
||||
minimum [((-k) * cap / log (1 - (errRate ** (1 / k))), k)
|
||||
| k <- [1..100]]
|
||||
roundedBits = nextPowerOfTwo (ceiling bits)
|
||||
- in if roundedBits <= 0 || roundedBits > 0xffffffff
|
||||
+ in if roundedBits <= 0
|
||||
then Left "capacity too large to represent"
|
||||
else Right (roundedBits, truncate hashes)
|
||||
|
||||
--
|
||||
2.5.1
|
||||
|
Loading…
Reference in New Issue
Block a user