diff options
author | he <he@pkgsrc.org> | 2022-06-25 09:35:51 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2022-06-25 09:35:51 +0000 |
commit | 16893a5f77235fd9d768d3e6b7afb39e3546e51b (patch) | |
tree | 6d425bdf24f46bf579d8da417ab23e59373c85fd /databases/sqlite | |
parent | d17a65bea9e76d30d22e79a003425a314d20f0c5 (diff) | |
download | pkgsrc-16893a5f77235fd9d768d3e6b7afb39e3546e51b.tar.gz |
databases/sqlite: adopt upstream patch instead.
Adopt & apply https://sqlite.org/src/info/8d399a03de63c159
on advice from Taylor Campbell.
Ride previous PKGREVISION bump.
Diffstat (limited to 'databases/sqlite')
-rw-r--r-- | databases/sqlite/distinfo | 4 | ||||
-rw-r--r-- | databases/sqlite/patches/patch-tool_lemon.c | 116 |
2 files changed, 116 insertions, 4 deletions
diff --git a/databases/sqlite/distinfo b/databases/sqlite/distinfo index 4129a8da7a1..88a827d2b09 100644 --- a/databases/sqlite/distinfo +++ b/databases/sqlite/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.29 2022/06/25 09:17:38 he Exp $ +$NetBSD: distinfo,v 1.30 2022/06/25 09:35:51 he Exp $ BLAKE2s (sqlite-2.8.17.tar.gz) = 2750dd8a0682b2047139de66b6a184b08e7674cb92846c629561604fc130fe37 SHA512 (sqlite-2.8.17.tar.gz) = 966e0b7f7ebbaaa9e1899864475040946fd7b66363be778d29fadd5184623b1e62644f3c8d4c4ecd001b88044befa7c34d9de9f68590329a1a8301d854b73e3f @@ -6,4 +6,4 @@ Size (sqlite-2.8.17.tar.gz) = 969805 bytes SHA1 (patch-Makefile.in) = a7e6d0c15b6bd4c8c0f3a7123e82a145b3848703 SHA1 (patch-aa) = 4df2eff8c92b3e2bff86c710ef1a803d54201559 SHA1 (patch-ab) = 00b7de05589fb62d511e26d0d864a8b5545967c8 -SHA1 (patch-tool_lemon.c) = c536a2784e9f360fc3d73c2ed0a243fee02358ff +SHA1 (patch-tool_lemon.c) = 53e561c8b693af4b416c1f151780c69324f61b2c diff --git a/databases/sqlite/patches/patch-tool_lemon.c b/databases/sqlite/patches/patch-tool_lemon.c index 2449a8705e4..aa57cc3f1d6 100644 --- a/databases/sqlite/patches/patch-tool_lemon.c +++ b/databases/sqlite/patches/patch-tool_lemon.c @@ -1,9 +1,11 @@ -$NetBSD: patch-tool_lemon.c,v 1.2 2022/06/25 09:17:38 he Exp $ +$NetBSD: patch-tool_lemon.c,v 1.3 2022/06/25 09:35:52 he Exp $ Avoid either undefined or implementation defined behaviour, by making the base hash variable unsigned, so that we avoid it ever going negative (as it did on powerpc). +Just adopt & apply https://sqlite.org/src/info/8d399a03de63c159 + --- tool/lemon.c.orig 2005-04-23 22:43:22.000000000 +0000 +++ tool/lemon.c @@ -3016,7 +3016,7 @@ int mhflag; /* True if g @@ -11,7 +13,117 @@ it ever going negative (as it did on powerpc). char *stddt; /* Standardized name for a datatype */ int i,j; /* Loop counters */ - int hash; /* For hashing the name of a type */ -+ unsigned int hash; /* For hashing the name of a type */ ++ unsigned hash; /* For hashing the name of a type */ char *name; /* Name of the parser */ /* Allocate and initialize types[] and allocate stddt[] */ +@@ -3711,10 +3711,10 @@ char *s2; + ** Code for processing tables in the LEMON parser generator. + */ + +-PRIVATE int strhash(x) ++PRIVATE unsigned strhash(x) + char *x; + { +- int h = 0; ++ unsigned h = 0; + while( *x) h = h*13 + *(x++); + return h; + } +@@ -3786,8 +3786,8 @@ int Strsafe_insert(data) + char *data; + { + x1node *np; +- int h; +- int ph; ++ unsigned h; ++ unsigned ph; + + if( x1a==0 ) return 0; + ph = strhash(data); +@@ -3842,7 +3842,7 @@ char *data; + char *Strsafe_find(key) + char *key; + { +- int h; ++ unsigned h; + x1node *np; + + if( x1a==0 ) return 0; +@@ -3949,8 +3949,8 @@ struct symbol *data; + char *key; + { + x2node *np; +- int h; +- int ph; ++ unsigned h; ++ unsigned ph; + + if( x2a==0 ) return 0; + ph = strhash(key); +@@ -4007,7 +4007,7 @@ char *key; + struct symbol *Symbol_find(key) + char *key; + { +- int h; ++ unsigned h; + x2node *np; + + if( x2a==0 ) return 0; +@@ -4084,10 +4084,10 @@ struct config *b; + } + + /* Hash a state */ +-PRIVATE int statehash(a) ++PRIVATE unsigned statehash(a) + struct config *a; + { +- int h=0; ++ unsigned h=0; + while( a ){ + h = h*571 + a->rp->index*37 + a->dot; + a = a->bp; +@@ -4155,8 +4155,8 @@ struct state *data; + struct config *key; + { + x3node *np; +- int h; +- int ph; ++ unsigned h; ++ unsigned ph; + + if( x3a==0 ) return 0; + ph = statehash(key); +@@ -4213,7 +4213,7 @@ struct config *key; + struct state *State_find(key) + struct config *key; + { +- int h; ++ unsigned h; + x3node *np; + + if( x3a==0 ) return 0; +@@ -4243,10 +4243,10 @@ struct state **State_arrayof() + } + + /* Hash a configuration */ +-PRIVATE int confighash(a) ++PRIVATE unsigned confighash(a) + struct config *a; + { +- int h=0; ++ unsigned h=0; + h = h*571 + a->rp->index*37 + a->dot; + return h; + } +@@ -4300,8 +4300,8 @@ int Configtable_insert(data) + struct config *data; + { + x4node *np; +- int h; +- int ph; ++ unsigned h; ++ unsigned ph; + + if( x4a==0 ) return 0; + ph = confighash(data); |