From: drh Date: Fri, 25 Jul 2008 13:32:44 +0000 (+0000) Subject: Require the SQLITE_ENABLE_INSTVFS symbol in order to compile testfixture X-Git-Tag: version-3.6.10~699 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=40f2c76720c19c0e8e8516e85f1a5cfc9f38754c;p=thirdparty%2Fsqlite.git Require the SQLITE_ENABLE_INSTVFS symbol in order to compile testfixture with sqlite3_instvfs enabled. This allows fulltest to run on platforms for which we do not have a working hwtime.h (ex: ppc, s390). Change requested from the SuSE team. (CVS 5478) FossilOrigin-Name: 16c164e79c2033347a36d6f7150eb8d2e0497c78 --- diff --git a/manifest b/manifest index fccbd16710..19e78ad07c 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Make\sthe\slibtclsqlite3.la\sshared\slibrary\sdepend\son\sa\sseparate\nlibsqlite3.la\sshared\slibrary.\s\sI\sthink\sthis\sflies\sin\sthe\sface\sof\sthe\nwhole\sSQLite\sphilosophy\sof\sminimal\sdependencies,\sbut\son\sthe\sother\shand,\nfew\speople\suse\sthat\sshared\slibrary\sand\sthe\scapability\shas\sbeen\srequested\nfrom\sthe\sSuSE\steam.\s(CVS\s5477) -D 2008-07-25T12:49:45 +C Require\sthe\sSQLITE_ENABLE_INSTVFS\ssymbol\sin\sorder\sto\scompile\stestfixture\nwith\ssqlite3_instvfs\senabled.\s\sThis\sallows\sfulltest\sto\srun\son\splatforms\nfor\swhich\swe\sdo\snot\shave\sa\sworking\shwtime.h\s(ex:\sppc,\ss390).\s\sChange\nrequested\sfrom\sthe\sSuSE\steam.\s(CVS\s5478) +D 2008-07-25T13:32:45 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in d677b8dbc24fd815043e87e9350f8d296ab40f0d F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -172,7 +172,7 @@ F src/test_malloc.c cd90645ea37a5199b4cb3168223f73a29160cca9 F src/test_md5.c 28209a4e2068711b5443c33104fe41f21d160071 F src/test_mutex.c d3422d9f60cc1330249d102e74b333f0d24a0cb6 F src/test_onefile.c 243157b10275251c5dc2d6619aee2ff9ae22379c -F src/test_osinst.c 49d777e6129bead1726e316e83751be35f455acc +F src/test_osinst.c ae29e9c09485622a157849508302dd9ffe44f21f F src/test_schema.c 4b4bf7bb329326458c491b0e6facd4c8c4c5b479 F src/test_server.c f0a403b5f699c09bd2b1236b6f69830fd6221f6b F src/test_tclvar.c 73530070df8378571c8ce6bbbbb993236ae3ad0b @@ -612,7 +612,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P e7a604807f9f3f92920b2bac403d2dd368dfa102 -R 3bb39f47d2a2a127694e46d60a5fa10a +P 83484b42bf353535567e245a92f40096b63b342f +R 088827a2af753bbeb1ed53c69cf94177 U drh -Z 17b472ba95d0b892f34c1cae01ec7074 +Z e1d6a1cd0ffd39b061d9a043430a84b7 diff --git a/manifest.uuid b/manifest.uuid index 276578f939..eb40a924a5 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -83484b42bf353535567e245a92f40096b63b342f \ No newline at end of file +16c164e79c2033347a36d6f7150eb8d2e0497c78 \ No newline at end of file diff --git a/src/test_osinst.c b/src/test_osinst.c index c2230786f3..a05ef7aa23 100644 --- a/src/test_osinst.c +++ b/src/test_osinst.c @@ -14,9 +14,10 @@ ** adds instrumentation to all vfs and file methods. C and Tcl interfaces ** are provided to control the instrumentation. ** -** $Id: test_osinst.c,v 1.17 2008/07/12 15:55:55 danielk1977 Exp $ +** $Id: test_osinst.c,v 1.18 2008/07/25 13:32:45 drh Exp $ */ +#ifdef SQLITE_ENABLE_INSTVFS /* ** C interface: ** @@ -809,6 +810,7 @@ sqlite3_vfs *sqlite3_instvfs_binarylog( return pVfs; } +#endif /* SQLITE_ENABLE_INSTVFS */ /************************************************************************** *************************************************************************** @@ -818,6 +820,7 @@ sqlite3_vfs *sqlite3_instvfs_binarylog( #include +#ifdef SQLITE_ENABLE_INSTVFS struct InstVfsCall { Tcl_Interp *interp; Tcl_Obj *pScript; @@ -1039,10 +1042,28 @@ static int test_sqlite3_instvfs( return TCL_OK; } +#endif /* SQLITE_ENABLE_INSTVFS */ + +/* Alternative implementation of sqlite3_instvfs when the real +** implementation is unavailable. +*/ +#ifndef SQLITE_ENABLE_INSTVFS +static int test_sqlite3_instvfs( + void * clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *CONST objv[] +){ + Tcl_AppendResult(interp, + "not compiled with -DSQLITE_ENABLE_INSTVFS; sqlite3_instvfs is " + "unavailable", (char*)0); + return TCL_ERROR; +} +#endif /* !defined(SQLITE_ENABLE_INSTVFS) */ int SqlitetestOsinst_Init(Tcl_Interp *interp){ Tcl_CreateObjCommand(interp, "sqlite3_instvfs", test_sqlite3_instvfs, 0, 0); return TCL_OK; } -#endif +#endif /* SQLITE_TEST */