Thu Sep 29 21:10:33 2011 UTC ()
Fix build on systems that define popcount().
(wiz)
diff -r1.2 -r1.3 pkgsrc/security/p5-Digest-Nilsimsa/distinfo
diff -r0 -r1.1 pkgsrc/security/p5-Digest-Nilsimsa/patches/patch-__nilsimsa.c
--- pkgsrc/security/p5-Digest-Nilsimsa/distinfo 2005/02/24 13:10:10 1.2
+++ pkgsrc/security/p5-Digest-Nilsimsa/distinfo 2011/09/29 21:10:32 1.3
| @@ -1,5 +1,6 @@ | | | @@ -1,5 +1,6 @@ |
1 | $NetBSD: distinfo,v 1.2 2005/02/24 13:10:10 agc Exp $ | | 1 | $NetBSD: distinfo,v 1.3 2011/09/29 21:10:32 wiz Exp $ |
2 | | | 2 | |
3 | SHA1 (Digest-Nilsimsa-0.06.tar.gz) = 6f9248c6a900c08bea64830930be12572000171b | | 3 | SHA1 (Digest-Nilsimsa-0.06.tar.gz) = 6f9248c6a900c08bea64830930be12572000171b |
4 | RMD160 (Digest-Nilsimsa-0.06.tar.gz) = e744cecf7780468e4a7309990e506596cd873150 | | 4 | RMD160 (Digest-Nilsimsa-0.06.tar.gz) = e744cecf7780468e4a7309990e506596cd873150 |
5 | Size (Digest-Nilsimsa-0.06.tar.gz) = 79065 bytes | | 5 | Size (Digest-Nilsimsa-0.06.tar.gz) = 79065 bytes |
| | | 6 | SHA1 (patch-__nilsimsa.c) = ff8ad175317cade836e5a35ee6e475648f97fcd2 |
$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;
}