diff --git a/ext/async/sqlite3async.c b/ext/async/sqlite3async.c index 5c52f5f652..9d912b1861 100644 --- a/ext/async/sqlite3async.c +++ b/ext/async/sqlite3async.c @@ -10,7 +10,7 @@ ** ************************************************************************* ** -** $Id: sqlite3async.c,v 1.5 2009/04/29 18:12:00 shane Exp $ +** $Id: sqlite3async.c,v 1.6 2009/04/30 17:45:34 shane Exp $ ** ** This file contains the implementation of an asynchronous IO backend ** for SQLite. @@ -19,7 +19,7 @@ #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ASYNCIO) #include "sqlite3async.h" -#include "sqliteInt.h" +#include "sqlite3.h" #include #include #include @@ -28,6 +28,11 @@ #define MIN(x,y) ((x)<(y)?(x):(y)) #define MAX(x,y) ((x)>(y)?(x):(y)) +#ifndef SQLITE_AMALGAMATION +/* Macro to mark parameters as unused and silence compiler warnings. */ +#define UNUSED_PARAMETER(x) (void)(x) +#endif + /* Forward references */ typedef struct AsyncWrite AsyncWrite; typedef struct AsyncFile AsyncFile; @@ -242,6 +247,8 @@ static void async_os_shutdown(void); */ #if SQLITE_OS_WIN || defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) +#include + /* The following block contains the win32 specific code. */ #define mutex_held(X) (GetCurrentThreadId()==primitives.aHolder[X]) @@ -302,7 +309,6 @@ static void async_cond_signal(int eCond){ SetEvent(primitives.aCond[eCond]); } static void async_sched_yield(void){ - /* Todo: Find out if win32 offers anything like sched_yield() */ Sleep(0); } #else @@ -703,7 +709,7 @@ static int asyncRead( if( iBeginIn<0 ) iBeginIn = 0; if( iBeginOut<0 ) iBeginOut = 0; - nCopy = MIN(pWrite->nByte-iBeginIn, iAmt-iBeginOut); + nCopy = (int)MIN(pWrite->nByte-iBeginIn, iAmt-iBeginOut); if( nCopy>0 ){ memcpy(&((char *)zOut)[iBeginOut], &pWrite->zBuf[iBeginIn], nCopy); @@ -751,7 +757,7 @@ int asyncFileSize(sqlite3_file *pFile, sqlite3_int64 *piSize){ async_mutex_enter(ASYNC_MUTEX_QUEUE); - /* Read the filesystem size from the base file. If pBaseRead is NULL, this + /* Read the filesystem size from the base file. If pMethods is NULL, this ** means the file hasn't been opened yet. In this case all relevant data ** must be in the write-op queue anyway, so we can omit reading from the ** file-system. diff --git a/manifest b/manifest index 6a14c5a08f..8d049d7a66 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Disable\san\salways-false\stest\sin\sthe\sattach.c\smodule.\s(CVS\s6581) -D 2009-04-30T17:38:38 +C More\scleanup,\setc.\sto\ssupport\sMSVC\scompiles.\s(CVS\s6582) +D 2009-04-30T17:45:34 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -25,7 +25,7 @@ F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538 F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac F ext/README.txt 913a7bd3f4837ab14d7e063304181787658b14e1 F ext/async/README.txt 0c541f418b14b415212264cbaaf51c924ec62e5b -F ext/async/sqlite3async.c 207af6692a52cf1dc3a9e64c93dcd7f7a7db0a6f +F ext/async/sqlite3async.c a10dd8add8544c62faf1b6eccb6b1e535b5e7cad F ext/async/sqlite3async.h b6d74dbf9aa5a0ac4e79aa15a4d987f3552a0f75 F ext/fts1/README.txt 20ac73b006a70bcfd80069bdaf59214b6cf1db5e F ext/fts1/ft_hash.c 3927bd880e65329bdc6f506555b228b28924921b @@ -726,7 +726,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P d67af3f5a21329e133aa6cf2be745a9f8c1a6562 -R 1053ef59038cf5f36f9be3b18c891400 -U drh -Z f5c5a2a7db3916e075df663b238c5cc6 +P 92b69481bd0eedf06599c40623b38a6f4990010a +R 1fb8411f09203d4b0b597f4bb4bb4448 +U shane +Z c3fcacee57f0e52fd4f695bca1750e29 diff --git a/manifest.uuid b/manifest.uuid index ec868153c4..e987d2cff1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -92b69481bd0eedf06599c40623b38a6f4990010a \ No newline at end of file +2cd9655e7313671f2bbe8d4a6f13246cbbf61205 \ No newline at end of file