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
This commit is contained in:
dan 2010-05-14 10:43:28 +00:00
parent 14740f1cd5
commit a9f0fc8edc
3 changed files with 13 additions and 18 deletions

View File

@ -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

View File

@ -1 +1 @@
b8a9b37a3c8d1005a16185c1fc4c414ca11d736a
2a4014b79b852d8b62b4941495b826f154308d86

View File

@ -68,12 +68,6 @@
#include <string.h>
#include <assert.h>
/*
** 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 <sys/time.h>
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 *);