summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreinoud <reinoud>2001-12-05 02:04:04 +0000
committerreinoud <reinoud>2001-12-05 02:04:04 +0000
commitbb714ce209aa92c50ac134bea8c65831a96fb266 (patch)
treebad9c6b92213cf31355483f8b4a4e29e47e5cf5e
parent8aeaaeff5c31df721ed21edbda3fcc04e97bc0dc (diff)
downloadpkgsrc-bb714ce209aa92c50ac134bea8c65831a96fb266.tar.gz
Update sqlite package to version 2.1.4 (2001-12-04) incorporating lockup
bugs removal, fixing the behaviour of comparison operators so that they are consistent with the order of entries in an index, correct handling of integers in SQL expressions that are larger than what can be represented by the machine integer and locking protocol fixes. The author also incorporated my suggestions after the messy LP64 patches I made; its now a lot more clean allthough there are still a few warnings but they are checked and OK.
-rw-r--r--databases/sqlite/Makefile7
-rw-r--r--databases/sqlite/distinfo11
-rw-r--r--databases/sqlite/patches/patch-ab63
-rw-r--r--databases/sqlite/patches/patch-ac40
-rw-r--r--databases/sqlite/patches/patch-ad18
-rw-r--r--databases/sqlite/patches/patch-ae22
-rw-r--r--databases/sqlite/patches/patch-af30
7 files changed, 8 insertions, 183 deletions
diff --git a/databases/sqlite/Makefile b/databases/sqlite/Makefile
index 278fed2d8d2..844bd9a4fb3 100644
--- a/databases/sqlite/Makefile
+++ b/databases/sqlite/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2001/11/19 01:15:46 reinoud Exp $
+# $NetBSD: Makefile,v 1.4 2001/12/05 02:04:04 reinoud Exp $
-DISTNAME= sqlite-2.1.1
+DISTNAME= sqlite-2.1.4
CATEGORIES= databases
MASTER_SITES= http://www.hwaci.com/sw/sqlite/
@@ -19,6 +19,9 @@ CONFIGURE_SCRIPT= ../sqlite/configure
CONFIGURE_ARGS+= --without-tcl
CONFIGURE_ENV+= config_TARGET_READLINE_INC="-I${BUILDLINK_DIR}/include"
+CFLAGS+= -DUINT32_TYPE=uint32_t -DUINT16_TYPE=uint16_t \
+ -DUINT8_TYPE=uint8_t -DINTPTR_TYPE=long
+
post-extract:
${MKDIR} ${WRKSRC}
diff --git a/databases/sqlite/distinfo b/databases/sqlite/distinfo
index 771322c1fc6..55b1fb1b06e 100644
--- a/databases/sqlite/distinfo
+++ b/databases/sqlite/distinfo
@@ -1,10 +1,5 @@
-$NetBSD: distinfo,v 1.4 2001/11/19 01:15:46 reinoud Exp $
+$NetBSD: distinfo,v 1.5 2001/12/05 02:04:04 reinoud Exp $
-SHA1 (sqlite-2.1.1.tar.gz) = 2a0c281139b47b29ece507bc49418a706dabeefa
-Size (sqlite-2.1.1.tar.gz) = 595969 bytes
+SHA1 (sqlite-2.1.4.tar.gz) = 9fd031211eaa50fd4a7dabf159423ce345a6fbd3
+Size (sqlite-2.1.4.tar.gz) = 601068 bytes
SHA1 (patch-aa) = 05d0408a9c3f6a371b4b9cf5464aa5a7b436023b
-SHA1 (patch-ab) = 830fac5d2ed46cd06c75783bf56e0b89d7d82863
-SHA1 (patch-ac) = a242f378220a004317b697c8c5e20b1d7c40bd77
-SHA1 (patch-ad) = 0e694856fb4c4888de98f1a2fe07c49533ae1c29
-SHA1 (patch-ae) = 4ea17c257833c6efdc14fdfb0c6ef4a5a4cd943f
-SHA1 (patch-af) = 6519be2937c19512f1974bddb1aad75493224bfc
diff --git a/databases/sqlite/patches/patch-ab b/databases/sqlite/patches/patch-ab
deleted file mode 100644
index 1ed2714d1e8..00000000000
--- a/databases/sqlite/patches/patch-ab
+++ /dev/null
@@ -1,63 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2001/11/19 00:41:06 reinoud Exp $
-
---- ../sqlite/src/btree.c.orig Sat Nov 10 14:51:08 2001
-+++ ../sqlite/src/btree.c
-@@ -60,7 +60,7 @@
- ** The uptr type must be big enough to hold a pointer.
- ** Change these typedefs when porting to new architectures.
- */
--typedef unsigned int uptr;
-+typedef unsigned long long int uptr;
-
- /* There are already defined in sqliteInt.h...
- ** typedef unsigned int u32;
-@@ -829,7 +829,7 @@
- int sqliteBtreeCursor(Btree *pBt, int iTable, int wrFlag, BtCursor **ppCur){
- int rc;
- BtCursor *pCur;
-- int nLock;
-+ long long int nLock;
-
- if( pBt->page1==0 ){
- rc = lockBtree(pBt);
-@@ -852,7 +852,7 @@
- if( rc!=SQLITE_OK ){
- goto create_cursor_exception;
- }
-- nLock = (int)sqliteHashFind(&pBt->locks, 0, iTable);
-+ nLock = (long long int)sqliteHashFind(&pBt->locks, 0, iTable);
- if( nLock<0 || (nLock>0 && wrFlag) ){
- rc = SQLITE_LOCKED;
- goto create_cursor_exception;
-@@ -886,7 +886,7 @@
- ** when the last cursor is closed.
- */
- int sqliteBtreeCloseCursor(BtCursor *pCur){
-- int nLock;
-+ long long int nLock;
- Btree *pBt = pCur->pBt;
- if( pCur->pPrev ){
- pCur->pPrev->pNext = pCur->pNext;
-@@ -900,7 +900,7 @@
- sqlitepager_unref(pCur->pPage);
- }
- unlockBtreeIfUnused(pBt);
-- nLock = (int)sqliteHashFind(&pBt->locks, 0, pCur->pgnoRoot);
-+ nLock = (long long int)sqliteHashFind(&pBt->locks, 0, pCur->pgnoRoot);
- assert( nLock!=0 || sqlite_malloc_failed );
- nLock = nLock<0 ? 0 : nLock-1;
- sqliteHashInsert(&pBt->locks, 0, pCur->pgnoRoot, (void*)nLock);
-@@ -2293,11 +2293,11 @@
- */
- int sqliteBtreeClearTable(Btree *pBt, int iTable){
- int rc;
-- int nLock;
-+ long long int nLock;
- if( !pBt->inTrans ){
- return SQLITE_ERROR; /* Must start a transaction first */
- }
-- nLock = (int)sqliteHashFind(&pBt->locks, 0, iTable);
-+ nLock = (long long int)sqliteHashFind(&pBt->locks, 0, iTable);
- if( nLock ){
- return SQLITE_LOCKED;
- }
diff --git a/databases/sqlite/patches/patch-ac b/databases/sqlite/patches/patch-ac
deleted file mode 100644
index d26b1fd7c86..00000000000
--- a/databases/sqlite/patches/patch-ac
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2001/10/20 18:52:38 reinoud Exp $
-
---- ../sqlite/src/build.c.orig Mon Oct 15 02:44:36 2001
-+++ ../sqlite/src/build.c
-@@ -97,7 +97,7 @@
- void sqliteExprSpan(Expr *pExpr, Token *pLeft, Token *pRight){
- if( pExpr ){
- pExpr->span.z = pLeft->z;
-- pExpr->span.n = pRight->n + (int)pRight->z - (int)pLeft->z;
-+ pExpr->span.n = pRight->n + (long long int)pRight->z - (long long int)pLeft->z;
- }
- }
-
-@@ -489,7 +489,7 @@
- i = p->nCol-1;
- if( i<0 ) return;
- pz = &p->aCol[i].zType;
-- n = pLast->n + ((int)pLast->z) - (int)pFirst->z;
-+ n = pLast->n + ((long long int)pLast->z) - (long long int)pFirst->z;
- sqliteSetNString(pz, pFirst->z, n, 0);
- z = *pz;
- if( z==0 ) return;
-@@ -604,7 +604,7 @@
-
- v = sqliteGetVdbe(pParse);
- if( v==0 ) return;
-- n = (int)pEnd->z - (int)pParse->sFirstToken.z + 1;
-+ n = (long long int)pEnd->z - (long long int)pParse->sFirstToken.z + 1;
- if( !p->isTemp ){
- sqliteVdbeAddOp(v, OP_NewRecno, 0, 0);
- sqliteVdbeAddOp(v, OP_String, 0, 0);
-@@ -952,7 +952,7 @@
- if( !isTemp ){
- addr = sqliteVdbeAddOp(v, OP_String, 0, 0);
- if( pStart && pEnd ){
-- n = (int)pEnd->z - (int)pStart->z + 1;
-+ n = (long long int)pEnd->z - (long long int)pStart->z + 1;
- sqliteVdbeChangeP3(v, addr, pStart->z, n);
- }
- sqliteVdbeAddOp(v, OP_MakeRecord, 5, 0);
diff --git a/databases/sqlite/patches/patch-ad b/databases/sqlite/patches/patch-ad
deleted file mode 100644
index b32ed43fb1f..00000000000
--- a/databases/sqlite/patches/patch-ad
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2001/10/20 18:52:38 reinoud Exp $
-
---- ../sqlite/src/hash.c.orig Fri Oct 12 19:30:05 2001
-+++ ../sqlite/src/hash.c
-@@ -68,11 +68,11 @@
- ** Hash and comparison functions when the mode is SQLITE_HASH_POINTER
- */
- static int ptrHash(const void *pKey, int nKey){
-- nKey = (int)pKey;
-+ nKey = (int)pKey; /* XXX LP64 violation but since its a hash it might be ok XXX */
- return nKey ^ (nKey<<8) ^ (nKey>>8);
- }
- static int ptrCompare(const void *pKey1, int n1, const void *pKey2, int n2){
-- return ((int)pKey2) - (int)pKey1;
-+ return ((char *)pKey2) - (char *)pKey1;
- }
-
- /*
diff --git a/databases/sqlite/patches/patch-ae b/databases/sqlite/patches/patch-ae
deleted file mode 100644
index 5536e8f491a..00000000000
--- a/databases/sqlite/patches/patch-ae
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ae,v 1.1 2001/10/20 18:52:38 reinoud Exp $
-
---- ../sqlite/src/main.c.orig Sat Oct 20 16:45:32 2001
-+++ ../sqlite/src/main.c
-@@ -462,7 +462,7 @@
- #if SQLITE_MIN_SLEEP_MS==1
- int delay = 10;
- int prior_delay = 0;
-- int timeout = (int)Timeout;
-+ int timeout = (int)Timeout; /* XXX LP64 violation but propably OK due to range XXX */
- int i;
-
- for(i=1; i<count; i++){
-@@ -509,7 +509,7 @@
- */
- void sqlite_busy_timeout(sqlite *db, int ms){
- if( ms>0 ){
-- sqlite_busy_handler(db, sqliteDefaultBusyCallback, (void*)ms);
-+ sqlite_busy_handler(db, sqliteDefaultBusyCallback, (void*)ms); /* XXX LP64 violation but propably ok XXX */
- }else{
- sqlite_busy_handler(db, 0, 0);
- }
diff --git a/databases/sqlite/patches/patch-af b/databases/sqlite/patches/patch-af
deleted file mode 100644
index dd6c7bcaf18..00000000000
--- a/databases/sqlite/patches/patch-af
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-af,v 1.1 2001/10/20 18:52:38 reinoud Exp $
-
---- ../sqlite/src/table.c.orig Sat Oct 20 16:48:56 2001
-+++ ../sqlite/src/table.c
-@@ -17,6 +17,7 @@
- ** if they are not used.
- */
- #include <stdlib.h>
-+#include <string.h>
- #include "sqlite.h"
-
- /*
-@@ -137,7 +138,7 @@
- res.azResult[0] = 0;
- rc = sqlite_exec(db, zSql, sqlite_get_table_cb, &res, pzErrMsg);
- if( res.azResult ){
-- res.azResult[0] = (char*)res.nData;
-+ res.azResult[0] = (char*)res.nData; /* XXX LP64 violation but prolly OK since it doesnt lose stuff XXX */
- }
- if( rc==SQLITE_ABORT ){
- sqlite_free_table(&res.azResult[1]);
-@@ -166,7 +167,7 @@
- if( azResult ){
- int i, n;
- azResult--;
-- n = (int)azResult[0];
-+ n = (int)azResult[0]; /* XXX LP64 violation but in API .... unless the number of recs. > 2^32 its ok :) XXX */
- for(i=1; i<n; i++){ if( azResult[i] ) free(azResult[i]); }
- free(azResult);
- }