summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-09-29 21:10:32 +0000
committerwiz <wiz@pkgsrc.org>2011-09-29 21:10:32 +0000
commitcefda018db7d824b4ff2f49142b3084c1ba664b7 (patch)
tree226da2c501bdff5a86760b8dbd9c372ceb2211f9 /security
parentcc930550a90c955210a44f55e649d1320e6a8b06 (diff)
downloadpkgsrc-cefda018db7d824b4ff2f49142b3084c1ba664b7.tar.gz
Fix build on systems that define popcount().
Diffstat (limited to 'security')
-rw-r--r--security/p5-Digest-Nilsimsa/distinfo3
-rw-r--r--security/p5-Digest-Nilsimsa/patches/patch-__nilsimsa.c37
2 files changed, 39 insertions, 1 deletions
diff --git a/security/p5-Digest-Nilsimsa/distinfo b/security/p5-Digest-Nilsimsa/distinfo
index bb938e3a269..9c49ba9c632 100644
--- a/security/p5-Digest-Nilsimsa/distinfo
+++ b/security/p5-Digest-Nilsimsa/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.2 2005/02/24 13:10:10 agc Exp $
+$NetBSD: distinfo,v 1.3 2011/09/29 21:10:32 wiz Exp $
SHA1 (Digest-Nilsimsa-0.06.tar.gz) = 6f9248c6a900c08bea64830930be12572000171b
RMD160 (Digest-Nilsimsa-0.06.tar.gz) = e744cecf7780468e4a7309990e506596cd873150
Size (Digest-Nilsimsa-0.06.tar.gz) = 79065 bytes
+SHA1 (patch-__nilsimsa.c) = ff8ad175317cade836e5a35ee6e475648f97fcd2
diff --git a/security/p5-Digest-Nilsimsa/patches/patch-__nilsimsa.c b/security/p5-Digest-Nilsimsa/patches/patch-__nilsimsa.c
new file mode 100644
index 00000000000..364b287f586
--- /dev/null
+++ b/security/p5-Digest-Nilsimsa/patches/patch-__nilsimsa.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-__nilsimsa.c,v 1.1 2011/09/29 21:10:33 wiz Exp $
+
+Fix build on systems that define popcount().
+
+--- _nilsimsa.c.orig 2002-06-13 04:15:03.000000000 +0000
++++ _nilsimsa.c
+@@ -48,7 +48,7 @@
+ */
+
+ unsigned int acc[256],threshold;
+-unsigned char tran[256],popcount[256];
++unsigned char tran[256],pop_count[256];
+ struct nsrecord *selkarbi,terkarbi,*rules,gunma;
+ int nilselkarbi,nrules;
+ char *comparestr,*rulefile,*checkrulefile;
+@@ -90,10 +90,10 @@ void dumptran()
+
+ void fillpopcount()
+ {int i,j;
+- memset(popcount,0,256);
++ memset(pop_count,0,256);
+ for (i=0;i<256;i++)
+ for (j=0;j<8;j++)
+- popcount[i]+=1&(i>>j);
++ pop_count[i]+=1&(i>>j);
+ }
+
+ int defromulate(FILE *file)
+@@ -384,7 +384,7 @@ void makecode(struct nsrecord *a)
+ int nilsimsa(struct nsrecord *a,struct nsrecord *b)
+ {int i,bits;
+ for (i=bits=0;i<32;i++)
+- bits+=popcount[255&(a->code[i]^b->code[i])];
++ bits+=pop_count[255&(a->code[i]^b->code[i])];
+ return 128-bits;
+ }
+