summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreinoud <reinoud@pkgsrc.org>2001-10-20 18:52:38 +0000
committerreinoud <reinoud@pkgsrc.org>2001-10-20 18:52:38 +0000
commit11c0beb7b124da1e530445f1e12423f48ecb9b6f (patch)
treea907d295cffd8d420948669a89cf1a26e0fd2f73
parente7f271ddfa7e455f3503aeea80285beebba6f038 (diff)
downloadpkgsrc-11c0beb7b124da1e530445f1e12423f48ecb9b6f.tar.gz
Hmm... shouldn't have forgotten to ad the patches themselves.... (AHUM)
-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
-rw-r--r--databases/sqlite/patches/patch-ag49
6 files changed, 222 insertions, 0 deletions
diff --git a/databases/sqlite/patches/patch-ab b/databases/sqlite/patches/patch-ab
new file mode 100644
index 00000000000..efaec98b1a7
--- /dev/null
+++ b/databases/sqlite/patches/patch-ab
@@ -0,0 +1,63 @@
+$NetBSD: patch-ab,v 1.1 2001/10/20 18:52:38 reinoud Exp $
+
+--- ../sqlite/src/btree.c.orig Mon Oct 15 02:44:35 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;
+@@ -818,7 +818,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);
+@@ -841,7 +841,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;
+@@ -875,7 +875,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;
+@@ -889,7 +889,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 );
+ nLock = nLock<0 ? 0 : nLock-1;
+ sqliteHashInsert(&pBt->locks, 0, pCur->pgnoRoot, (void*)nLock);
+@@ -2311,11 +2311,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
new file mode 100644
index 00000000000..d26b1fd7c86
--- /dev/null
+++ b/databases/sqlite/patches/patch-ac
@@ -0,0 +1,40 @@
+$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
new file mode 100644
index 00000000000..b32ed43fb1f
--- /dev/null
+++ b/databases/sqlite/patches/patch-ad
@@ -0,0 +1,18 @@
+$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
new file mode 100644
index 00000000000..5536e8f491a
--- /dev/null
+++ b/databases/sqlite/patches/patch-ae
@@ -0,0 +1,22 @@
+$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
new file mode 100644
index 00000000000..dd6c7bcaf18
--- /dev/null
+++ b/databases/sqlite/patches/patch-af
@@ -0,0 +1,30 @@
+$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);
+ }
diff --git a/databases/sqlite/patches/patch-ag b/databases/sqlite/patches/patch-ag
new file mode 100644
index 00000000000..9f26c8861b2
--- /dev/null
+++ b/databases/sqlite/patches/patch-ag
@@ -0,0 +1,49 @@
+$NetBSD: patch-ag,v 1.1 2001/10/20 18:52:38 reinoud Exp $
+
+--- ../sqlite/tool/lemon.c.orig Sun Sep 16 01:07:32 2001
++++ ../sqlite/tool/lemon.c
+@@ -1305,7 +1305,7 @@
+ /*
+ ** Return a pointer to the next structure in the linked list.
+ */
+-#define NEXT(A) (*(char**)(((int)A)+offset))
++#define NEXT(A) (*(char**)(((char *)A)+offset))
+
+ /*
+ ** Inputs:
+@@ -1383,7 +1383,7 @@
+ char *ep;
+ char *set[LISTSIZE];
+ int i;
+- offset = (int)next - (int)list;
++ offset = (char *)next - (char *)list;
+ for(i=0; i<LISTSIZE; i++) set[i] = 0;
+ while( list ){
+ ep = list;
+@@ -1531,7 +1531,7 @@
+ if( *end ){
+ if( err ){
+ fprintf(err,"%sillegal character in floating-point argument.\n",emsg);
+- errline(i,((int)end)-(int)argv[i],err);
++ errline(i, (int) (end-argv[i]),err);
+ }
+ errcnt++;
+ }
+@@ -1542,7 +1542,7 @@
+ if( *end ){
+ if( err ){
+ fprintf(err,"%sillegal character in integer argument.\n",emsg);
+- errline(i,((int)end)-(int)argv[i],err);
++ errline(i, (int) (end-argv[i]),err);
+ }
+ errcnt++;
+ }
+@@ -2625,7 +2625,7 @@
+
+ cp = strrchr(lemp->filename,'.');
+ if( cp ){
+- sprintf(buf,"%.*s.lt",(int)cp-(int)lemp->filename,lemp->filename);
++ sprintf(buf,"%.*s.lt",cp-lemp->filename,lemp->filename);
+ }else{
+ sprintf(buf,"%s.lt",lemp->filename);
+ }