Sat Jun 25 09:17:38 2022 UTC ()
databases/sqlite: reinstall masking in hash computation.

Suggested by Taylor Campbell.


(he)
diff -r1.48 -r1.49 pkgsrc/databases/sqlite/Makefile
diff -r1.28 -r1.29 pkgsrc/databases/sqlite/distinfo
diff -r1.1 -r1.2 pkgsrc/databases/sqlite/patches/patch-tool_lemon.c

cvs diff -r1.48 -r1.49 pkgsrc/databases/sqlite/Makefile (expand / switch to unified diff)

--- pkgsrc/databases/sqlite/Makefile 2022/06/24 15:42:10 1.48
+++ pkgsrc/databases/sqlite/Makefile 2022/06/25 09:17:38 1.49
@@ -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
3DISTNAME= sqlite-2.8.17 3DISTNAME= sqlite-2.8.17
4PKGREVISION= 2 4PKGREVISION= 3
5CATEGORIES= databases 5CATEGORIES= databases
6MASTER_SITES= http://www.hwaci.com/sw/sqlite/ 6MASTER_SITES= http://www.hwaci.com/sw/sqlite/
7MASTER_SITES+= http://www.sqlite.org/ 7MASTER_SITES+= http://www.sqlite.org/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.hwaci.com/sw/sqlite/ 10HOMEPAGE= https://www.hwaci.com/sw/sqlite/
11COMMENT= SQL Database Engine in a C Library 11COMMENT= SQL Database Engine in a C Library
12 12
13USE_TOOLS+= gmake 13USE_TOOLS+= gmake
14USE_LIBTOOL= yes 14USE_LIBTOOL= yes
15 15
16GNU_CONFIGURE= yes 16GNU_CONFIGURE= yes
17OBJDIR= ../sqlite-build 17OBJDIR= ../sqlite-build

cvs diff -r1.28 -r1.29 pkgsrc/databases/sqlite/distinfo (expand / switch to unified diff)

--- pkgsrc/databases/sqlite/distinfo 2022/06/24 15:42:10 1.28
+++ pkgsrc/databases/sqlite/distinfo 2022/06/25 09:17:38 1.29
@@ -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
3BLAKE2s (sqlite-2.8.17.tar.gz) = 2750dd8a0682b2047139de66b6a184b08e7674cb92846c629561604fc130fe37 3BLAKE2s (sqlite-2.8.17.tar.gz) = 2750dd8a0682b2047139de66b6a184b08e7674cb92846c629561604fc130fe37
4SHA512 (sqlite-2.8.17.tar.gz) = 966e0b7f7ebbaaa9e1899864475040946fd7b66363be778d29fadd5184623b1e62644f3c8d4c4ecd001b88044befa7c34d9de9f68590329a1a8301d854b73e3f 4SHA512 (sqlite-2.8.17.tar.gz) = 966e0b7f7ebbaaa9e1899864475040946fd7b66363be778d29fadd5184623b1e62644f3c8d4c4ecd001b88044befa7c34d9de9f68590329a1a8301d854b73e3f
5Size (sqlite-2.8.17.tar.gz) = 969805 bytes 5Size (sqlite-2.8.17.tar.gz) = 969805 bytes
6SHA1 (patch-Makefile.in) = a7e6d0c15b6bd4c8c0f3a7123e82a145b3848703 6SHA1 (patch-Makefile.in) = a7e6d0c15b6bd4c8c0f3a7123e82a145b3848703
7SHA1 (patch-aa) = 4df2eff8c92b3e2bff86c710ef1a803d54201559 7SHA1 (patch-aa) = 4df2eff8c92b3e2bff86c710ef1a803d54201559
8SHA1 (patch-ab) = 00b7de05589fb62d511e26d0d864a8b5545967c8 8SHA1 (patch-ab) = 00b7de05589fb62d511e26d0d864a8b5545967c8
9SHA1 (patch-tool_lemon.c) = 118f2cf965dd4eaddef7228bdca89f9cae26d7c3 9SHA1 (patch-tool_lemon.c) = c536a2784e9f360fc3d73c2ed0a243fee02358ff

cvs diff -r1.1 -r1.2 pkgsrc/databases/sqlite/patches/patch-tool_lemon.c (expand / switch to unified diff)

--- pkgsrc/databases/sqlite/patches/patch-tool_lemon.c 2022/06/24 15:42:10 1.1
+++ pkgsrc/databases/sqlite/patches/patch-tool_lemon.c 2022/06/25 09:17:38 1.2
@@ -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
3Avoid either undefined or implementation defined behaviour, 3Avoid either undefined or implementation defined behaviour,
4by making the base hash variable unsigned, so that we avoid 4by making the base hash variable unsigned, so that we avoid
5it ever going negative (as it did on powerpc). 5it 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;