databases/sqlite: reinstall masking in hash computation. Suggested by Taylor Campbell.diff -r1.48 -r1.49 pkgsrc/databases/sqlite/Makefile
(he)
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.48 2022/06/24 15:42:10 he Exp $ | 1 | # $NetBSD: Makefile,v 1.49 2022/06/25 09:17:38 he Exp $ | |
2 | 2 | |||
3 | DISTNAME= sqlite-2.8.17 | 3 | DISTNAME= sqlite-2.8.17 | |
4 | PKGREVISION= 2 | 4 | PKGREVISION= 3 | |
5 | CATEGORIES= databases | 5 | CATEGORIES= databases | |
6 | MASTER_SITES= http://www.hwaci.com/sw/sqlite/ | 6 | MASTER_SITES= http://www.hwaci.com/sw/sqlite/ | |
7 | MASTER_SITES+= http://www.sqlite.org/ | 7 | MASTER_SITES+= http://www.sqlite.org/ | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= https://www.hwaci.com/sw/sqlite/ | 10 | HOMEPAGE= https://www.hwaci.com/sw/sqlite/ | |
11 | COMMENT= SQL Database Engine in a C Library | 11 | COMMENT= SQL Database Engine in a C Library | |
12 | 12 | |||
13 | USE_TOOLS+= gmake | 13 | USE_TOOLS+= gmake | |
14 | USE_LIBTOOL= yes | 14 | USE_LIBTOOL= yes | |
15 | 15 | |||
16 | GNU_CONFIGURE= yes | 16 | GNU_CONFIGURE= yes | |
17 | OBJDIR= ../sqlite-build | 17 | OBJDIR= ../sqlite-build |
@@ -1,9 +1,9 @@ | @@ -1,9 +1,9 @@ | |||
1 | $NetBSD: distinfo,v 1.28 2022/06/24 15:42:10 he Exp $ | 1 | $NetBSD: distinfo,v 1.29 2022/06/25 09:17:38 he Exp $ | |
2 | 2 | |||
3 | BLAKE2s (sqlite-2.8.17.tar.gz) = 2750dd8a0682b2047139de66b6a184b08e7674cb92846c629561604fc130fe37 | 3 | BLAKE2s (sqlite-2.8.17.tar.gz) = 2750dd8a0682b2047139de66b6a184b08e7674cb92846c629561604fc130fe37 | |
4 | SHA512 (sqlite-2.8.17.tar.gz) = 966e0b7f7ebbaaa9e1899864475040946fd7b66363be778d29fadd5184623b1e62644f3c8d4c4ecd001b88044befa7c34d9de9f68590329a1a8301d854b73e3f | 4 | SHA512 (sqlite-2.8.17.tar.gz) = 966e0b7f7ebbaaa9e1899864475040946fd7b66363be778d29fadd5184623b1e62644f3c8d4c4ecd001b88044befa7c34d9de9f68590329a1a8301d854b73e3f | |
5 | Size (sqlite-2.8.17.tar.gz) = 969805 bytes | 5 | Size (sqlite-2.8.17.tar.gz) = 969805 bytes | |
6 | SHA1 (patch-Makefile.in) = a7e6d0c15b6bd4c8c0f3a7123e82a145b3848703 | 6 | SHA1 (patch-Makefile.in) = a7e6d0c15b6bd4c8c0f3a7123e82a145b3848703 | |
7 | SHA1 (patch-aa) = 4df2eff8c92b3e2bff86c710ef1a803d54201559 | 7 | SHA1 (patch-aa) = 4df2eff8c92b3e2bff86c710ef1a803d54201559 | |
8 | SHA1 (patch-ab) = 00b7de05589fb62d511e26d0d864a8b5545967c8 | 8 | SHA1 (patch-ab) = 00b7de05589fb62d511e26d0d864a8b5545967c8 | |
9 | SHA1 (patch-tool_lemon.c) = 118f2cf965dd4eaddef7228bdca89f9cae26d7c3 | 9 | SHA1 (patch-tool_lemon.c) = c536a2784e9f360fc3d73c2ed0a243fee02358ff |
@@ -1,26 +1,17 @@ | @@ -1,26 +1,17 @@ | |||
1 | $NetBSD: patch-tool_lemon.c,v 1.1 2022/06/24 15:42:10 he Exp $ | 1 | $NetBSD: patch-tool_lemon.c,v 1.2 2022/06/25 09:17:38 he Exp $ | |
2 | 2 | |||
3 | Avoid either undefined or implementation defined behaviour, | 3 | Avoid either undefined or implementation defined behaviour, | |
4 | by making the base hash variable unsigned, so that we avoid | 4 | by making the base hash variable unsigned, so that we avoid | |
5 | it ever going negative (as it did on powerpc). | 5 | it ever going negative (as it did on powerpc). | |
6 | 6 | |||
7 | --- tool/lemon.c.orig 2005-04-23 22:43:22.000000000 +0000 | 7 | --- tool/lemon.c.orig 2005-04-23 22:43:22.000000000 +0000 | |
8 | +++ tool/lemon.c | 8 | +++ tool/lemon.c | |
9 | @@ -3016,7 +3016,7 @@ int mhflag; /* True if g | 9 | @@ -3016,7 +3016,7 @@ int mhflag; /* True if g | |
10 | int maxdtlength; /* Maximum length of any ".datatype" field. */ | 10 | int maxdtlength; /* Maximum length of any ".datatype" field. */ | |
11 | char *stddt; /* Standardized name for a datatype */ | 11 | char *stddt; /* Standardized name for a datatype */ | |
12 | int i,j; /* Loop counters */ | 12 | int i,j; /* Loop counters */ | |
13 | - int hash; /* For hashing the name of a type */ | 13 | - int hash; /* For hashing the name of a type */ | |
14 | + unsigned int hash; /* For hashing the name of a type */ | 14 | + unsigned int hash; /* For hashing the name of a type */ | |
15 | char *name; /* Name of the parser */ | 15 | char *name; /* Name of the parser */ | |
16 | 16 | |||
17 | /* Allocate and initialize types[] and allocate stddt[] */ | 17 | /* Allocate and initialize types[] and allocate stddt[] */ | |
18 | @@ -3068,7 +3068,7 @@ int mhflag; /* True if g | |||
19 | for(j=0; stddt[j]; j++){ | |||
20 | hash = hash*53 + stddt[j]; | |||
21 | } | |||
22 | - hash = (hash & 0x7fffffff)%arraysize; | |||
23 | + hash = hash % arraysize; | |||
24 | while( types[hash] ){ | |||
25 | if( strcmp(types[hash],stddt)==0 ){ | |||
26 | sp->dtnum = hash + 1; |