diff options
author | drh <drh@noemail.net> | 2005-04-28 17:18:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2005-04-28 17:18:48 +0000 |
commit | 2e66f0b972eeaffc33464370aa5da1beb0c8fe0d (patch) | |
tree | b4cb0f536ef038d9e8ecd83eb73d310758cecbcf /src | |
parent | ee570fa4981a643934850ed9466e97828977bf66 (diff) | |
download | sqlite-2e66f0b972eeaffc33464370aa5da1beb0c8fe0d.tar.gz sqlite-2e66f0b972eeaffc33464370aa5da1beb0c8fe0d.zip |
Enhancements to allow for extensions. (CVS 2448)
FossilOrigin-Name: 6863703abcb2bf31d65792d4de9ae20aba2eadb5
Diffstat (limited to 'src')
-rw-r--r-- | src/os.h | 8 | ||||
-rw-r--r-- | src/pager.c | 5 | ||||
-rw-r--r-- | src/sqliteInt.h | 3 | ||||
-rw-r--r-- | src/tclsqlite.c | 7 | ||||
-rw-r--r-- | src/test1.c | 17 |
5 files changed, 34 insertions, 6 deletions
@@ -23,7 +23,7 @@ ** N.B. MacOS means Mac Classic (or Carbon). Treat Darwin (OS X) as Unix. ** The MacOS build is designed to use CodeWarrior (tested with v8) */ -#if !defined(OS_UNIX) && !defined(OS_TEST) +#if !defined(OS_UNIX) && !defined(OS_TEST) && !defined(OS_MEM) # ifndef OS_WIN # if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) # define OS_WIN 1 @@ -40,6 +40,9 @@ # define OS_WIN 0 # endif #endif +#ifndef OS_MEM +# define OS_MEM 0 +#endif /* ** Invoke the appropriate operating-system specific header file. @@ -53,6 +56,9 @@ #if OS_WIN # include "os_win.h" #endif +#if OS_MEM +# include "os_mem.h" +#endif /* If the SET_FULLSYNC macro is not defined above, then make it ** a no-op diff --git a/src/pager.c b/src/pager.c index 1bacc1326..cf5babddc 100644 --- a/src/pager.c +++ b/src/pager.c @@ -18,8 +18,9 @@ ** file simultaneously, or one process from reading the database while ** another is writing. ** -** @(#) $Id: pager.c,v 1.201 2005/03/28 18:04:28 drh Exp $ +** @(#) $Id: pager.c,v 1.202 2005/04/28 17:18:48 drh Exp $ */ +#ifndef SQLITE_OMIT_DISKIO #include "sqliteInt.h" #include "os.h" #include "pager.h" @@ -3591,3 +3592,5 @@ void sqlite3pager_refdump(Pager *pPager){ } } #endif + +#endif /* SQLITE_OMIT_DISKIO */ diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 8a30b7f36..fdf4a8cdd 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.376 2005/04/22 02:38:38 drh Exp $ +** @(#) $Id: sqliteInt.h,v 1.377 2005/04/28 17:18:49 drh Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -1570,5 +1570,6 @@ int sqlite3SelectResolve(Parse *, Select *, NameContext *); void sqlite3ColumnDefault(Vdbe *, Table *, int); void sqlite3AlterFinishAddColumn(Parse *, Token *); void sqlite3AlterBeginAddColumn(Parse *, SrcList *); +const char *sqlite3TestErrorName(int); #endif diff --git a/src/tclsqlite.c b/src/tclsqlite.c index f837b56de..634e875ba 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -11,7 +11,7 @@ ************************************************************************* ** A TCL Interface to SQLite ** -** $Id: tclsqlite.c,v 1.121 2005/04/03 23:54:44 danielk1977 Exp $ +** $Id: tclsqlite.c,v 1.122 2005/04/28 17:18:49 drh Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ @@ -1771,12 +1771,17 @@ int TCLSH_MAIN(int argc, char **argv){ extern int Sqlitetest4_Init(Tcl_Interp*); extern int Sqlitetest5_Init(Tcl_Interp*); extern int Md5_Init(Tcl_Interp*); + extern int Sqlitetestsse_Init(Tcl_Interp*); + Sqlitetest1_Init(interp); Sqlitetest2_Init(interp); Sqlitetest3_Init(interp); Sqlitetest4_Init(interp); Sqlitetest5_Init(interp); Md5_Init(interp); +#ifdef SQLITE_TEST_SSE + Sqlitetestsse_Init(interp); +#endif } #endif if( argc>=2 || TCLSH==2 ){ diff --git a/src/test1.c b/src/test1.c index 0a774a922..0099566f5 100644 --- a/src/test1.c +++ b/src/test1.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test1.c,v 1.137 2005/04/22 02:38:38 drh Exp $ +** $Id: test1.c,v 1.138 2005/04/28 17:18:49 drh Exp $ */ #include "sqliteInt.h" #include "tcl.h" @@ -21,7 +21,7 @@ #include <stdlib.h> #include <string.h> -static const char * errorName(int rc){ +const char *sqlite3TestErrorName(int rc){ const char *zName = 0; switch( rc ){ case SQLITE_OK: zName = "SQLITE_OK"; break; @@ -57,6 +57,7 @@ static const char * errorName(int rc){ } return zName; } +#define errorName sqlite3TestErrorName /* ** Convert an sqlite3_stmt* into an sqlite3*. This depends on the @@ -2789,6 +2790,12 @@ static void set_options(Tcl_Interp *interp){ Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY); #endif +#ifdef SQLITE_OMIT_DISKIO + Tcl_SetVar2(interp, "sqlite_options", "diskio", "0", TCL_GLOBAL_ONLY); +#else + Tcl_SetVar2(interp, "sqlite_options", "diskio", "1", TCL_GLOBAL_ONLY); +#endif + #ifdef SQLITE_OMIT_EXPLAIN Tcl_SetVar2(interp, "sqlite_options", "explain", "0", TCL_GLOBAL_ONLY); #else @@ -2831,6 +2838,12 @@ static void set_options(Tcl_Interp *interp){ Tcl_SetVar2(interp, "sqlite_options", "pager_pragmas", "1", TCL_GLOBAL_ONLY); #endif +#ifdef SQLITE_OMIT_PARSER + Tcl_SetVar2(interp, "sqlite_options", "parser", "0", TCL_GLOBAL_ONLY); +#else + Tcl_SetVar2(interp, "sqlite_options", "parser", "1", TCL_GLOBAL_ONLY); +#endif + #if defined(SQLITE_OMIT_PRAGMA) || defined(SQLITE_OMIT_FLAG_PRAGMAS) Tcl_SetVar2(interp, "sqlite_options", "pragma", "0", TCL_GLOBAL_ONLY); Tcl_SetVar2(interp, "sqlite_options", "integrityck", "0", TCL_GLOBAL_ONLY); |