Index: third_party/sqlite/src/src/test_vfs.c |
diff --git a/third_party/sqlite/src/src/test_vfs.c b/third_party/sqlite/src/src/test_vfs.c |
index a8c6ae7bf50d15a669460860f64778a5fb4a6887..fb987a6163a655b07e602f0c64e352633cba9894 100644 |
--- a/third_party/sqlite/src/src/test_vfs.c |
+++ b/third_party/sqlite/src/src/test_vfs.c |
@@ -28,7 +28,11 @@ |
#include "sqlite3.h" |
#include "sqliteInt.h" |
-#include <tcl.h> |
+#if defined(INCLUDE_SQLITE_TCL_H) |
+# include "sqlite_tcl.h" |
+#else |
+# include "tcl.h" |
+#endif |
typedef struct Testvfs Testvfs; |
typedef struct TestvfsShm TestvfsShm; |
@@ -306,7 +310,6 @@ static void tvfsExecTcl( |
** Close an tvfs-file. |
*/ |
static int tvfsClose(sqlite3_file *pFile){ |
- int rc; |
TestvfsFile *pTestfile = (TestvfsFile *)pFile; |
TestvfsFd *pFd = pTestfile->pFd; |
Testvfs *p = (Testvfs *)pFd->pVfs->pAppData; |
@@ -324,10 +327,10 @@ static int tvfsClose(sqlite3_file *pFile){ |
if( pFile->pMethods ){ |
ckfree((char *)pFile->pMethods); |
} |
- rc = sqlite3OsClose(pFd->pReal); |
+ sqlite3OsClose(pFd->pReal); |
ckfree((char *)pFd); |
pTestfile->pFd = 0; |
- return rc; |
+ return SQLITE_OK; |
} |
/* |
@@ -1037,7 +1040,7 @@ static int tvfsUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *p){ |
return sqlite3OsUnfetch(pFd->pReal, iOfst, p); |
} |
-static int testvfs_obj_cmd( |
+static int SQLITE_TCLAPI testvfs_obj_cmd( |
ClientData cd, |
Tcl_Interp *interp, |
int objc, |
@@ -1349,7 +1352,7 @@ static int testvfs_obj_cmd( |
return TCL_OK; |
} |
-static void testvfs_obj_del(ClientData cd){ |
+static void SQLITE_TCLAPI testvfs_obj_del(ClientData cd){ |
Testvfs *p = (Testvfs *)cd; |
if( p->pScript ) Tcl_DecrRefCount(p->pScript); |
sqlite3_vfs_unregister(p->pVfs); |
@@ -1392,7 +1395,7 @@ static void testvfs_obj_del(ClientData cd){ |
** |
** where LOCK is of the form "OFFSET NBYTE lock/unlock shared/exclusive" |
*/ |
-static int testvfs_cmd( |
+static int SQLITE_TCLAPI testvfs_cmd( |
ClientData cd, |
Tcl_Interp *interp, |
int objc, |