From: mistachkin Date: Sat, 20 Dec 2014 22:21:49 +0000 (+0000) Subject: Support manually disabling overlapped file I/O for Windows sub-platforms other than... X-Git-Tag: version-3.8.8~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9d812fc3878495b7435d6c25b64209b04330f2c;p=thirdparty%2Fsqlite.git Support manually disabling overlapped file I/O for Windows sub-platforms other than Windows CE. FossilOrigin-Name: b9330b887cc8bed2b6b3e6c1b269788e08ccf50d --- diff --git a/manifest b/manifest index 6353c101f7..24ba3c7b0a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Minor\sfixes\sand\senhancements\sto\sthe\sSQLITE_ENABLE_API_ARMOR\sfunctionality. -D 2014-12-20T21:14:14.374 +C Support\smanually\sdisabling\soverlapped\sfile\sI/O\sfor\sWindows\ssub-platforms\sother\sthan\sWindows\sCE. +D 2014-12-20T22:21:49.905 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 6c4f961fa91d0b4fa121946a19f9e5eac2f2f809 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -214,7 +214,7 @@ F src/os.h 3e57a24e2794a94d3cf2342c6d9a884888cd96bf F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa F src/os_unix.c fb587121840f690101336879adfa6d0b2cd0e8c7 -F src/os_win.c ecb04a0dad2fa6fa659931a9d8f0f3aca33f908a +F src/os_win.c 91d3d08e33ec0258d180d4c8255492f47d15e007 F src/os_win.h 09e751b20bbc107ffbd46e13555dc73576d88e21 F src/pager.c 2cbaf886a6157c53a8061ea7e677f81620ff46eb F src/pager.h c3476e7c89cdf1c6914e50a11f3714e30b4e0a77 @@ -1234,7 +1234,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P de50f25ce3226fa4929b8236c72c88b739859d5f -R c123b89e18af5f5ce6fabce3b17d012e +P cb3e4219ac9560d2773b85453aafda54b7c9346f +R ac9484154ad6b155e9718a0c54a2f6d5 U mistachkin -Z 086c85a234ecd6ff163dc839ee55f963 +Z f0b985b941d4fc82caba937840400408 diff --git a/manifest.uuid b/manifest.uuid index 31b35da2d7..b62cc74d7e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -cb3e4219ac9560d2773b85453aafda54b7c9346f \ No newline at end of file +b9330b887cc8bed2b6b3e6c1b269788e08ccf50d \ No newline at end of file diff --git a/src/os_win.c b/src/os_win.c index 80ce97a6cd..e2f9aecac6 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -2479,7 +2479,7 @@ static int winRead( int amt, /* Number of bytes to read */ sqlite3_int64 offset /* Begin reading at this offset */ ){ -#if !SQLITE_OS_WINCE +#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED) OVERLAPPED overlapped; /* The offset for ReadFile. */ #endif winFile *pFile = (winFile*)id; /* file handle */ @@ -2511,7 +2511,7 @@ static int winRead( } #endif -#if SQLITE_OS_WINCE +#if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED) if( winSeekFile(pFile, offset) ){ OSTRACE(("READ file=%p, rc=SQLITE_FULL\n", pFile->h)); return SQLITE_FULL; @@ -2583,13 +2583,13 @@ static int winWrite( } #endif -#if SQLITE_OS_WINCE +#if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED) rc = winSeekFile(pFile, offset); if( rc==0 ){ #else { #endif -#if !SQLITE_OS_WINCE +#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED) OVERLAPPED overlapped; /* The offset for WriteFile. */ #endif u8 *aRem = (u8 *)pBuf; /* Data yet to be written */ @@ -2597,14 +2597,14 @@ static int winWrite( DWORD nWrite; /* Bytes written by each WriteFile() call */ DWORD lastErrno = NO_ERROR; /* Value returned by GetLastError() */ -#if !SQLITE_OS_WINCE +#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED) memset(&overlapped, 0, sizeof(OVERLAPPED)); overlapped.Offset = (LONG)(offset & 0xffffffff); overlapped.OffsetHigh = (LONG)((offset>>32) & 0x7fffffff); #endif while( nRem>0 ){ -#if SQLITE_OS_WINCE +#if SQLITE_OS_WINCE || defined(SQLITE_WIN32_NO_OVERLAPPED) if( !osWriteFile(pFile->h, aRem, nRem, &nWrite, 0) ){ #else if( !osWriteFile(pFile->h, aRem, nRem, &nWrite, &overlapped) ){ @@ -2617,7 +2617,7 @@ static int winWrite( lastErrno = osGetLastError(); break; } -#if !SQLITE_OS_WINCE +#if !SQLITE_OS_WINCE && !defined(SQLITE_WIN32_NO_OVERLAPPED) offset += nWrite; overlapped.Offset = (LONG)(offset & 0xffffffff); overlapped.OffsetHigh = (LONG)((offset>>32) & 0x7fffffff);