Index: src/os_win.c ================================================================== --- src/os_win.c +++ src/os_win.c @@ -10,11 +10,11 @@ ** ****************************************************************************** ** ** This file contains code that is specific to windows. ** -** $Id: os_win.c,v 1.139 2008/11/18 19:18:52 drh Exp $ +** $Id: os_win.c,v 1.140 2008/11/19 21:35:47 shane Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_WIN /* This file is used for windows only */ @@ -1551,10 +1551,15 @@ /* ** Write up to nBuf bytes of randomness into zBuf. */ static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){ int n = 0; + UNUSED_PARAMETER(pVfs); +#if defined(SQLITE_TEST) + n = nBuf; + memset(zBuf, 0, nBuf); +#else if( sizeof(SYSTEMTIME)<=nBuf-n ){ SYSTEMTIME x; GetSystemTime(&x); memcpy(&zBuf[n], &x, sizeof(x)); n += sizeof(x); @@ -1573,10 +1578,11 @@ LARGE_INTEGER i; QueryPerformanceCounter(&i); memcpy(&zBuf[n], &i, sizeof(i)); n += sizeof(i); } +#endif return n; } /*