]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove the config.h file from the build. Ticket #1224. (CVS 2480)
authordrh <drh@noemail.net>
Tue, 24 May 2005 20:19:57 +0000 (20:19 +0000)
committerdrh <drh@noemail.net>
Tue, 24 May 2005 20:19:57 +0000 (20:19 +0000)
FossilOrigin-Name: 3e64f1ab417f371e9875915303b898c5b45f0807

Makefile.in
main.mk
manifest
manifest.uuid
src/btree.c
src/build.c
src/expr.c
src/main.c
src/sqliteInt.h

index 3c7668484c00df8dcefd1ce749f6cb8701f0e7ee..05fe8851f4d8ca207ed61c13588ad890a04bb620 100644 (file)
@@ -193,7 +193,6 @@ TESTSRC = \
 HDR = \
    sqlite3.h  \
    $(TOP)/src/btree.h \
-   config.h \
    $(TOP)/src/hash.h \
    opcodes.h \
    $(TOP)/src/os.h \
@@ -277,22 +276,6 @@ btree.lo:  $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
 build.lo:      $(TOP)/src/build.c $(HDR)
        $(LTCOMPILE) -c $(TOP)/src/build.c
 
-# The config.h file will contain a single #define that tells us how
-# many bytes are in a pointer.  This only works if a pointer is the
-# same size on the host as it is on the target.  If you are cross-compiling
-# to a target with a different pointer size, you'll need to manually
-# configure the config.h file.
-#
-config.h:      
-       echo '#include <stdio.h>' >temp.c
-       echo 'int main(){printf(' >>temp.c
-       echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c
-       echo 'exit(0);}' >>temp.c
-       $(BCC) -o temp temp.c
-       ./temp >config.h
-       echo >>config.h
-       rm -f temp.c temp
-
 callback.lo:   $(TOP)/src/callback.c $(HDR)
        $(LTCOMPILE) -c $(TOP)/src/callback.c
 
diff --git a/main.mk b/main.mk
index 845db967d9d599ce71a8ff21e86e03747f2f9f30..cd95c57fa33a12de70288364f155dbce4a971051 100644 (file)
--- a/main.mk
+++ b/main.mk
@@ -136,7 +136,6 @@ TESTSRC = \
 HDR = \
    sqlite3.h  \
    $(TOP)/src/btree.h \
-   config.h \
    $(TOP)/src/hash.h \
    opcodes.h \
    $(TOP)/src/os.h \
@@ -156,7 +155,7 @@ VDBEHDR = \
 # This is the default Makefile target.  The objects listed here
 # are what get build when you type just "make" with no arguments.
 #
-all:   sqlite3.h config.h libsqlite3.a sqlite3$(EXE)
+all:   sqlite3.h libsqlite3.a sqlite3$(EXE)
 
 # Generate the file "last_change" which contains the date of change
 # of the most recently modified source code file
@@ -212,22 +211,6 @@ btree.o:   $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
 build.o:       $(TOP)/src/build.c $(HDR)
        $(TCCX) -c $(TOP)/src/build.c
 
-# The config.h file will contain a single #define that tells us how
-# many bytes are in a pointer.  This only works if a pointer is the
-# same size on the host as it is on the target.  If you are cross-compiling
-# to a target with a different pointer size, you'll need to manually
-# configure the config.h file.
-#
-config.h:      
-       echo '#include <stdio.h>' >temp.c
-       echo 'int main(){printf(' >>temp.c
-       echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c
-       echo 'exit(0);}' >>temp.c
-       $(BCC) -o temp temp.c
-       ./temp >config.h
-       echo >>config.h
-       rm -f temp.c temp
-
 callback.o:    $(TOP)/src/callback.c $(HDR)
        $(TCCX) -c $(TOP)/src/callback.c
 
index c0ab534ec5edfc196cabdbd210b09e9544a81e6b..69ac2d872a4b4c2a509ba1f7d5113d555b870a21 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,6 +1,6 @@
-C Move\sa\sfew\sthings\saround\sto\smake\sbuilding\swithout\sthe\sparser\seasier.\s(CVS\s2479)
-D 2005-05-24T12:01:01
-F Makefile.in d9507f787ff6dbf650138ad5484cf24aa77884d3
+C Remove\sthe\sconfig.h\sfile\sfrom\sthe\sbuild.\s\sTicket\s#1224.\s(CVS\s2480)
+D 2005-05-24T20:19:58
+F Makefile.in b2b2d69640853c3917fedd9296e9003d610d86b1
 F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
 F VERSION 44187d7938af15a89b7b2dcd0016ffe5ec84961f
@@ -16,7 +16,7 @@ F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
 F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac
 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
 F ltmain.sh f6b283068efa69f06eb8aa1fe4bddfdbdeb35826
-F main.mk 4002b109f2e3a3d64f4ef24a3e0c5755fc42911e
+F main.mk 4695aa29032a0665c2becf38a29180b38b90e178
 F mkdll.sh 5ec23622515d5bf8969404e80cfb5e220ddf0512
 F mkopcodec.awk bd46ad001c98dfbab07b1713cb8e692fa0e5415d
 F mkopcodeh.awk 7563ad235670e864ead95cf672be3fe081450ae0
@@ -30,20 +30,20 @@ F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
 F src/alter.c 9570af388bc99471ea6e1258817fbf06e3120030
 F src/attach.c 3615dbe960cbee4aa5ea300b8a213dad36527b0f
 F src/auth.c 18c5a0befe20f3a58a41e3ddd78f372faeeefe1f
-F src/btree.c 85ee452bf378f297054aded9ea6eaed846fa4855
+F src/btree.c d2e09ebf755bfd665727133361b22c6a915b12d7
 F src/btree.h 41a71ce027db9ddee72cb43df2316bbe3a1d92af
-F src/build.c 5d3cee156a3e010303db5615e335e7e23d82d5e1
+F src/build.c b7a5d09791cff54dbe9d8ace89217fcbc6cd475d
 F src/callback.c c80e399ec3ef01d9a667f87c79331648a4debb13
 F src/date.c 2134ef4388256e8247405178df8a61bd60dc180a
 F src/delete.c 75b53db21aa1879d3655bbbc208007db31d58a63
 F src/experimental.c 50c1e3b34f752f4ac10c36f287db095c2b61766d
-F src/expr.c 62cfa7d8b3debc85495e61df03930e7fdfc2a80c
+F src/expr.c 54a4c18d34c0f81b0e9b6dff40ce97a8fcd6f2a8
 F src/func.c f208d71f741d47b63277530939f552815af8ce35
 F src/hash.c 2b1b13f7400e179631c83a1be0c664608c8f021f
 F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84
 F src/insert.c 34c25c33f51a43644a42cc091ac967b070c6b6d5
 F src/legacy.c d58ea507bce885298a2c8c3cbb0f4bff5d47830b
-F src/main.c e7aae2fbc0b29aa4c3fb7639ca69e9cc32e6855f
+F src/main.c 8de9c03d8388d2ccb3a89bdf0596f2280e21b655
 F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
 F src/os.h e5438be25cf96858787bf9b60fc7a2420e139ee3
 F src/os_common.h 0e7f428ba0a6c40a61bc56c4e96f493231301b73
@@ -62,7 +62,7 @@ F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
 F src/select.c 43cc2a76e3e00dabc59da82d0dcdef23cdba43a3
 F src/shell.c 25b3217d7c64e6497225439d261a253a23efff26
 F src/sqlite.h.in 3675e3ada207e09b9d52a0463561325df4ac26b5
-F src/sqliteInt.h a1f5cc21e7f615a50be484ff4916af0852a0e1a3
+F src/sqliteInt.h 9eb8fa1c04da427a0a840b0a0359a8b763484c58
 F src/table.c 25b3ff2b39b7d87e8d4a5da0713d68dfc06cbee9
 F src/tclsqlite.c af0f002d9d6ab4f7f32b9bee5b57665946e76ad9
 F src/test1.c 4ad7ffe5a74fd99d4f73f6fd28ba27f403b3adba
@@ -280,7 +280,7 @@ F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
 F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
-P 42a626ace126f730f33ecb6c41ac5679d6766a31
-R bfa075e2f7d191385c3e4fa4220d17e2
-U danielk1977
-Z 75c5f4d08b7ca7a5578ff061978a62fb
+P 5fadb464eb77b4b998d8555f83401769960ea904
+R 559b7971d270b59c0ead6f07efa2b008
+U drh
+Z c2b1f0d897d1329ca3d0de496bb83bf1
index 599d704188a25ca782b90f574bd76e6be2458b93..87caa8643a07a8687fec80699b32ac0810964052 100644 (file)
@@ -1 +1 @@
-5fadb464eb77b4b998d8555f83401769960ea904
\ No newline at end of file
+3e64f1ab417f371e9875915303b898c5b45f0807
\ No newline at end of file
index e8f3c05f7eec70d805966ab02445f9c11f750b8d..27b5b45ac77ac1aca7833ea44e3648e369a3a386 100644 (file)
@@ -9,7 +9,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: btree.c,v 1.260 2005/05/20 20:01:56 drh Exp $
+** $Id: btree.c,v 1.261 2005/05/24 20:19:58 drh Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** For a detailed discussion of BTrees, refer to
@@ -1219,8 +1219,6 @@ int sqlite3BtreeOpen(
   assert( sizeof(u32)==4 );
   assert( sizeof(u16)==2 );
   assert( sizeof(Pgno)==4 );
-  assert( sizeof(ptr)==sizeof(char*) );
-  assert( sizeof(uptr)==sizeof(ptr) );
 
   pBt = sqliteMalloc( sizeof(*pBt) );
   if( pBt==0 ){
index 426675862d4b6e0537b3db85e291e49e1ed51efd..3e7ea9ae5ba4b2aaa780861d607ef52687ae0633 100644 (file)
@@ -22,7 +22,7 @@
 **     COMMIT
 **     ROLLBACK
 **
-** $Id: build.c,v 1.321 2005/05/24 12:01:02 danielk1977 Exp $
+** $Id: build.c,v 1.322 2005/05/24 20:19:58 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -1442,7 +1442,7 @@ void sqlite3EndTable(
     if( pSelect ){
       zStmt = createTableStmt(p);
     }else{
-      n = Addr(pEnd->z) - Addr(pParse->sNameToken.z) + 1;
+      n = pEnd->z - pParse->sNameToken.z + 1;
       zStmt = sqlite3MPrintf("CREATE %s %.*s", zType2, n, pParse->sNameToken.z);
     }
 
@@ -2395,7 +2395,7 @@ void sqlite3CreateIndex(
       /* A named index with an explicit CREATE INDEX statement */
       zStmt = sqlite3MPrintf("CREATE%s INDEX %.*s",
         onError==OE_None ? "" : " UNIQUE",
-        Addr(pEnd->z) - Addr(pName->z) + 1,
+        pEnd->z - pName->z + 1,
         pName->z);
     }else{
       /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */
index 84acbb1f6e86acdf53d4dd222ee65afd016371ca..e6ca219af77205ed4b67563d9403a10c4a90d470 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains routines used for analyzing expressions and
 ** for generating VDBE code that evaluates expressions in SQLite.
 **
-** $Id: expr.c,v 1.201 2005/05/24 12:01:02 danielk1977 Exp $
+** $Id: expr.c,v 1.202 2005/05/24 20:19:59 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -265,7 +265,7 @@ void sqlite3ExprSpan(Expr *pExpr, Token *pLeft, Token *pRight){
     assert( pLeft->dyn==0 || pLeft->z[pLeft->n]==0 );
     if( pLeft->dyn==0 && pRight->dyn==0 ){
       pExpr->span.z = pLeft->z;
-      pExpr->span.n = pRight->n + Addr(pRight->z) - Addr(pLeft->z);
+      pExpr->span.n = pRight->n + (pRight->z - pLeft->z);
     }else{
       pExpr->span.z = 0;
     }
index 3813101957134f0f4f752cc3ff58bd78242b8aff..445a0889f04cbd15992ad9f8f91a113dd7adf145 100644 (file)
@@ -14,7 +14,7 @@
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: main.c,v 1.289 2005/05/24 12:01:02 danielk1977 Exp $
+** $Id: main.c,v 1.290 2005/05/24 20:19:59 drh Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -631,7 +631,7 @@ const char *sqlite3ErrStr(int rc){
 ** argument.
 */
 static int sqliteDefaultBusyCallback(
- void *Timeout,           /* Maximum amount of time to wait */
+ void *ptr,               /* Database connection */
  int count                /* Number of times table has been busy */
 ){
 #if SQLITE_MIN_SLEEP_MS==1
@@ -640,8 +640,8 @@ static int sqliteDefaultBusyCallback(
   static const u8 totals[] =
      { 0, 1, 3,  8, 18, 33, 53, 78, 103, 128, 178, 228 };
 # define NDELAY (sizeof(delays)/sizeof(delays[0]))
-  ptr timeout = (ptr)Timeout;
-  ptr delay, prior;
+  int timeout = ((sqlite3 *)ptr)->busyTimeout;
+  int delay, prior;
 
   assert( count>=0 );
   if( count < NDELAY ){
@@ -717,7 +717,8 @@ void sqlite3_progress_handler(
 */
 int sqlite3_busy_timeout(sqlite3 *db, int ms){
   if( ms>0 ){
-    sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)(ptr)ms);
+    db->busyTimeout = ms;
+    sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
   }else{
     sqlite3_busy_handler(db, 0, 0);
   }
index 075f847ae62780d320aa33d06cbcca26e2db48b7..384a65691ffe3a999169397d0b59c596a797058f 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.382 2005/05/24 12:01:02 danielk1977 Exp $
+** @(#) $Id: sqliteInt.h,v 1.383 2005/05/24 20:19:59 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -39,7 +39,6 @@
 # define _LARGEFILE_SOURCE 1
 #endif
 
-#include "config.h"
 #include "sqlite3.h"
 #include "hash.h"
 #include "parse.h"
 #ifndef LONGDOUBLE_TYPE
 # define LONGDOUBLE_TYPE long double
 #endif
-#ifndef INTPTR_TYPE
-# if SQLITE_PTR_SZ==4
-#   define INTPTR_TYPE int
-# else
-#   define INTPTR_TYPE sqlite_int64
-# endif
-#endif
-#ifndef UINTPTR_TYPE
-# if SQLITE_PTR_SZ==4
-#   define UINTPTR_TYPE unsigned int
-# else
-#   define UINTPTR_TYPE sqlite_uint64
-# endif
-#endif
 typedef sqlite_int64 i64;          /* 8-byte signed integer */
 typedef UINT64_TYPE u64;           /* 8-byte unsigned integer */
 typedef UINT32_TYPE u32;           /* 4-byte unsigned integer */
@@ -201,8 +186,6 @@ typedef UINT16_TYPE u16;           /* 2-byte unsigned integer */
 typedef INT16_TYPE i16;            /* 2-byte signed integer */
 typedef UINT8_TYPE u8;             /* 1-byte unsigned integer */
 typedef UINT8_TYPE i8;             /* 1-byte signed integer */
-typedef INTPTR_TYPE ptr;           /* Big enough to hold a pointer */
-typedef UINTPTR_TYPE uptr;         /* Big enough to hold a pointer */
 
 /*
 ** Macros to determine whether the machine is big or little endian,
@@ -463,6 +446,7 @@ struct sqlite3 {
   Hash aFunc;                   /* All functions that can be in SQL exprs */
   Hash aCollSeq;                /* All collating sequences */
   BusyHandler busyHandler;      /* Busy callback */
+  int busyTimeout;             /* Busy handler timeout, in msec */
   Db aDbStatic[2];              /* Static space for the 2 default backends */
 #ifdef SQLITE_SSE
   sqlite3_stmt *pFetch;         /* Used by SSE to fetch stored statements */