From: dan Date: Fri, 14 May 2010 10:43:28 +0000 (+0000) Subject: Fix test_osinst.c so that it does not depend on gettimeofday() unless SQLITE_OS_UNIX... X-Git-Tag: version-3.7.2~377 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a9f0fc8edc0344c5ffc6ee76ed6a2c808a45f772;p=thirdparty%2Fsqlite.git Fix test_osinst.c so that it does not depend on gettimeofday() unless SQLITE_OS_UNIX is defined and NO_GETTOD is not defined. FossilOrigin-Name: 2a4014b79b852d8b62b4941495b826f154308d86 --- diff --git a/manifest b/manifest index d8c4e6c09c..313f8a78b8 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sxShmXXX\smethods\sto\stest_osinst.c. -D 2010-05-14T08:39:48 +C Fix\stest_osinst.c\sso\sthat\sit\sdoes\snot\sdepend\son\sgettimeofday()\sunless\sSQLITE_OS_UNIX\sis\sdefined\sand\sNO_GETTOD\sis\snot\sdefined. +D 2010-05-14T10:43:29 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -201,7 +201,7 @@ F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e F src/test_malloc.c 2842c922b8e8d992aba722214952204ca025b411 F src/test_mutex.c ce06b59aca168cd8c520b77159a24352a7469bd3 F src/test_onefile.c df4d7858b5cd1dffe92d36ec9dbad11f0037ffd1 -F src/test_osinst.c 06ccd1bcf8193bd80bccbea07c0b2f40ea48bfdb +F src/test_osinst.c f7f8e69ea2e3ae35d12504d4a217d4428877d10c F src/test_pcache.c 7bf828972ac0d2403f5cfa4cd14da41f8ebe73d8 F src/test_schema.c 8c06ef9ddb240c7a0fcd31bc221a6a2aade58bf0 F src/test_server.c bbba05c144b5fc4b52ff650a4328027b3fa5fcc6 @@ -814,7 +814,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P e823c60ca4c3d515b8b12dada4631fe8f44975e9 -R 688705eb72656d22ec89aa9c72974093 +P b8a9b37a3c8d1005a16185c1fc4c414ca11d736a +R 22a19b365180f3219e9e4c395814c904 U dan -Z 7259351bee10f369f829692c8f5e1054 +Z 35e6a22ba40a68ef7fff9e464f5954e1 diff --git a/manifest.uuid b/manifest.uuid index ee6ac2cf62..c7e8404555 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b8a9b37a3c8d1005a16185c1fc4c414ca11d736a \ No newline at end of file +2a4014b79b852d8b62b4941495b826f154308d86 \ No newline at end of file diff --git a/src/test_osinst.c b/src/test_osinst.c index f14ab06a4a..c75e0cf8cb 100644 --- a/src/test_osinst.c +++ b/src/test_osinst.c @@ -68,12 +68,6 @@ #include #include -/* -** hwtime.h contains inline assembler code for implementing -** high-performance timing routines. -*/ -#include "hwtime.h" - /* ** Maximum pathname length supported by the vfslog backend. @@ -215,17 +209,18 @@ static sqlite3_io_methods vfslog_io_methods = { vfslogShmClose /* xShmClose */ }; +#if defined(SQLITE_OS_UNIX) && !defined(NO_GETTOD) #include - static sqlite3_uint64 vfslog_time(){ -#if 0 - return sqlite3Hwtime(); -#else struct timeval sTime; gettimeofday(&sTime, 0); return sTime.tv_usec + (sqlite3_uint64)sTime.tv_sec * 1000000; -#endif } +#else +static sqlite3_uint64 vfslog_time(){ + return 0; +} +#endif static void vfslog_call(sqlite3_vfs *, int, int, int, int, int, int); static void vfslog_string(sqlite3_vfs *, const char *);