mirror of
https://github.com/sqlite/sqlite.git
synced 2024-11-29 00:12:23 +01:00
Allow SQLite to work on Win32 with SQLITE_OS_WINNT=0 as long as WAL is disabled.
FossilOrigin-Name: c1a8557008e56aa9bcb4565e4178fc57295c563d
This commit is contained in:
parent
8cca95d7aa
commit
c60941f814
@ -889,6 +889,9 @@ fulltest: testfixture$(TEXE) sqlite3$(TEXE)
|
||||
soaktest: testfixture$(TEXE) sqlite3$(TEXE)
|
||||
./testfixture$(TEXE) $(TOP)/test/all.test -soak=1
|
||||
|
||||
fulltestonly: testfixture$(TEXE) sqlite3$(TEXE)
|
||||
./testfixture$(TEXE) $(TOP)/test/full.test
|
||||
|
||||
test: testfixture$(TEXE) sqlite3$(TEXE)
|
||||
./testfixture$(TEXE) $(TOP)/test/veryquick.test
|
||||
|
||||
|
@ -1169,6 +1169,9 @@ fulltest: testfixture.exe sqlite3.exe
|
||||
soaktest: testfixture.exe sqlite3.exe
|
||||
.\testfixture.exe $(TOP)\test\all.test -soak=1
|
||||
|
||||
fulltestonly: testfixture.exe sqlite3.exe
|
||||
.\testfixture.exe $(TOP)\test\full.test
|
||||
|
||||
test: testfixture.exe sqlite3.exe
|
||||
.\testfixture.exe $(TOP)\test\veryquick.test
|
||||
|
||||
|
@ -625,6 +625,9 @@ fulltest: testfixture$(EXE) sqlite3$(EXE)
|
||||
soaktest: testfixture$(EXE) sqlite3$(EXE)
|
||||
./testfixture$(EXE) $(TOP)/test/all.test -soak=1
|
||||
|
||||
fulltestonly: testfixture$(EXE) sqlite3$(EXE)
|
||||
./testfixture$(EXE) $(TOP)/test/full.test
|
||||
|
||||
test: testfixture$(EXE) sqlite3$(EXE)
|
||||
./testfixture$(EXE) $(TOP)/test/veryquick.test
|
||||
|
||||
|
3
main.mk
3
main.mk
@ -565,6 +565,9 @@ fulltest: testfixture$(EXE) sqlite3$(EXE)
|
||||
soaktest: testfixture$(EXE) sqlite3$(EXE)
|
||||
./testfixture$(EXE) $(TOP)/test/all.test -soak=1
|
||||
|
||||
fulltestonly: testfixture$(EXE) sqlite3$(EXE)
|
||||
./testfixture$(EXE) $(TOP)/test/full.test
|
||||
|
||||
test: testfixture$(EXE) sqlite3$(EXE)
|
||||
./testfixture$(EXE) $(TOP)/test/veryquick.test
|
||||
|
||||
|
39
manifest
39
manifest
@ -1,10 +1,10 @@
|
||||
C Update\sversion\snumber\sto\s3.7.15.\s\sDelete\ssome\sobsolete\sbuild\sscripts.
|
||||
D 2012-09-12T00:11:20.574
|
||||
C Allow\sSQLite\sto\swork\son\sWin32\swith\sSQLITE_OS_WINNT=0\sas\slong\sas\sWAL\sis\sdisabled.
|
||||
D 2012-09-13T01:51:02.094
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in abd5c10d21d1395f140d9e50ea999df8fa4d6376
|
||||
F Makefile.in 5f4f26109f9d80829122e0e09f9cda008fa065fb
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
F Makefile.msc 2d696f01c228995e98b3b953a08b7bba1d48c130
|
||||
F Makefile.vxworks 879f034a64062a364b21000266bbd5bc6e0c19b9
|
||||
F Makefile.msc d97ae1025a1b7bb2b365b135fc0aa25247e736b2
|
||||
F Makefile.vxworks b18ad88e9a8c6a001f5cf4a389116a4f1a7ab45f
|
||||
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
|
||||
F VERSION edab4af5a4623f8198833ea481ce98ab53750a8d
|
||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||
@ -103,7 +103,7 @@ F ext/rtree/tkt3363.test 142ab96eded44a3615ec79fba98c7bde7d0f96de
|
||||
F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024
|
||||
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
|
||||
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
|
||||
F main.mk 72026405046ed5b1f0368943b89c0aa29ad558b6
|
||||
F main.mk 7b60c2663388270258f01b59fbf8b9bd78f946bf
|
||||
F mkdll.sh 7d09b23c05d56532e9d44a50868eb4b12ff4f74a
|
||||
F mkextu.sh 416f9b7089d80e5590a29692c9d9280a10dbad9f
|
||||
F mkextw.sh 4123480947681d9b434a5e7b1ee08135abe409ac
|
||||
@ -161,7 +161,7 @@ F src/os.c e1acdc09ff3ac2412945cca9766e2dcf4675f31c
|
||||
F src/os.h 027491c77d2404c0a678bb3fb06286f331eb9b57
|
||||
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
|
||||
F src/os_unix.c 69b2fe66316524eebf5f1ce85c1fdfe2952307e9
|
||||
F src/os_win.c 5dec8fe85ee547152075c020db72aec4382f0d0a
|
||||
F src/os_win.c d5f19e444b85f18b06f42958f20b5fedec1b9fc4
|
||||
F src/pager.c 5665fa9ecec51f11dabdfd8eefefa89391856007
|
||||
F src/pager.h 8b8c9bc065a3c66769df8724dfdf492ee1aab3c5
|
||||
F src/parse.y f29df90bd3adc64b33114ab1de9fb7768fcf2099
|
||||
@ -286,7 +286,7 @@ F test/autoindex1.test 058d0b331ae6840a61bbee910d8cbae27bfd5991
|
||||
F test/autovacuum.test fcaf4616ae5bb18098db1cb36262565e5c841c3c
|
||||
F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
|
||||
F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85
|
||||
F test/backcompat.test bccbc64769d9c755ad65ee7c2f7336b86e3cc0c8
|
||||
F test/backcompat.test e0d5a36828cc338754125059cf354c5813a4405f
|
||||
F test/backup.test c9cdd23a495864b9edf75a9fa66f5cb7e10fcf62
|
||||
F test/backup2.test 34986ef926ea522911a51dfdb2f8e99b7b75ebcf
|
||||
F test/backup_ioerr.test 40d208bc9224b666ee3ed423f49bc9062a36a9d0
|
||||
@ -364,7 +364,7 @@ F test/cse.test 277350a26264495e86b1785f34d2d0c8600e021c
|
||||
F test/ctime.test 7bd009071e242aac4f18521581536b652b789a47
|
||||
F test/date.test f3228180c87bbe5d39c9397bf001c0095c3821b9
|
||||
F test/dbstatus.test 207e5b63fcb7b9c3bb8e1fdf38ebd4654ad0e54b
|
||||
F test/dbstatus2.test b1de8250fde1f3474d6b86f0e89de38d84794f56
|
||||
F test/dbstatus2.test bf7396af964b89e39435babbcdf296ae8fc5f10a
|
||||
F test/default.test 6faf23ccb300114924353007795aa9a8ec0aa9dc
|
||||
F test/delete.test a065b05d2ebf60fd16639c579a4adfb7c381c701
|
||||
F test/delete2.test 3a03f2cca1f9a67ec469915cb8babd6485db43fa
|
||||
@ -501,6 +501,7 @@ F test/fts4merge.test c424309743fdd203f8e56a1f1cd7872cd66cc0ee
|
||||
F test/fts4merge2.test 5faa558d1b672f82b847d2a337465fa745e46891
|
||||
F test/fts4merge3.test aab02a09f50fe6baaddc2e159c3eabc116d45fc7
|
||||
F test/fts4unicode.test aad033abdcfa0f87ce5f56468f59fdf2a0acbcef
|
||||
F test/full.test 6b3c8fb43c6beab6b95438c1675374b95fab245d
|
||||
F test/func.test 0d89043dab9a8853358d14c68e028ee0093bf066
|
||||
F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
|
||||
F test/func3.test 001021e5b88bd02a3b365a5c5fd8f6f49d39744a
|
||||
@ -642,7 +643,7 @@ F test/pageropt.test 9191867ed19a2b3db6c42d1b36b6fbc657cd1ab0
|
||||
F test/pagesize.test 1dd51367e752e742f58e861e65ed7390603827a0
|
||||
F test/pcache.test 065aa286e722ab24f2e51792c1f093bf60656b16
|
||||
F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025
|
||||
F test/permutations.test 1a8ac849b659445a0b3883caf42fa2c2a289f4a1
|
||||
F test/permutations.test 360b92859c0af814b3fe10b68746936389606501
|
||||
F test/pragma.test a62f73293b0f0d79b0c87f8dd32d46fe53b0bd17
|
||||
F test/pragma2.test 3a55f82b954242c642f8342b17dffc8b47472947
|
||||
F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552
|
||||
@ -736,7 +737,7 @@ F test/tclsqlite.test a3d2df21ee98957f5de4f9dc1db0eab68047ab5d
|
||||
F test/tempdb.test 19d0f66e2e3eeffd68661a11c83ba5e6ace9128c
|
||||
F test/temptable.test 51edd31c65ed1560dd600b1796e8325df96318e2
|
||||
F test/temptrigger.test 26670ed7a39cf2296a7f0a9e0a1d7bdb7abe936d
|
||||
F test/tester.tcl 2665f64c9ce71944b4d41269114e658fb81bda05
|
||||
F test/tester.tcl ed47103d30a1a4b3c1d8de207606a407e55cc5c2
|
||||
F test/thread001.test 7cc2ce08f9cde95964736d11e91f9ab610f82f91
|
||||
F test/thread002.test e630504f8a06c00bf8bbe68528774dd96aeb2e58
|
||||
F test/thread003.test ee4c9efc3b86a6a2767516a37bd64251272560a7
|
||||
@ -762,13 +763,13 @@ F test/tkt-3a77c9714e.test 32bb28afa8c63fc76e972e996193139b63551ed9
|
||||
F test/tkt-3fe897352e.test 10de1a67bd5c66b238a4c96abe55531b37bb4f00
|
||||
F test/tkt-4a03edc4c8.test 2865e4edbc075b954daa82f8da7cc973033ec76e
|
||||
F test/tkt-54844eea3f.test a12b851128f46a695e4e378cca67409b9b8f5894
|
||||
F test/tkt-5d863f876e.test 884072c2de496ddbb90c387c9ebc0d4f44a91b8e
|
||||
F test/tkt-5d863f876e.test c9f36ca503fa154a3655f92a69d2c30da1747bfa
|
||||
F test/tkt-5e10420e8d.test 904d1687b3c06d43e5b3555bbcf6802e7c0ffd84
|
||||
F test/tkt-5ee23731f.test 9db6e1d7209dc0794948b260d6f82b2b1de83a9f
|
||||
F test/tkt-752e1646fc.test ea78d88d14fe9866bdd991c634483334639e13bf
|
||||
F test/tkt-78e04e52ea.test ab52f0c1e2de6e46c910f4cc16b086bba05952b7
|
||||
F test/tkt-7bbfb7d442.test dfa5c8097a8c353ae40705d6cddeb1f99c18b81a
|
||||
F test/tkt-80ba201079.test 9eb040d81c404f56838a6af93593f42790def63f
|
||||
F test/tkt-80ba201079.test 105a721e6aad0ae3c5946d7615d1e4d03f6145b8
|
||||
F test/tkt-80e031a00f.test 9a154173461a4dbe2de49cda73963e04842d52f7
|
||||
F test/tkt-8454a207b9.test c583a9f814a82a2b5ba95207f55001c9f0cd816c
|
||||
F test/tkt-91e2e8ba6f.test 08c4f94ae07696b05c9b822da0b4e5337a2f54c5
|
||||
@ -934,7 +935,7 @@ F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
|
||||
F test/wal5.test f58ed4b8b542f71c7441da12fbd769d99b362437
|
||||
F test/wal6.test 2e3bc767d9c2ce35c47106148d43fcbd072a93b3
|
||||
F test/wal7.test 2ae8f427d240099cc4b2dfef63cff44e2a68a1bd
|
||||
F test/wal8.test 5ab217d21f7e5e86af2933a4ffd0d8357cc2c0bd
|
||||
F test/wal8.test b3ee739fe8f7586aaebdc2367f477ebcf3e3b034
|
||||
F test/wal_common.tcl a98f17fba96206122eff624db0ab13ec377be4fe
|
||||
F test/walbak.test b9f68e39646375c2b877be906babcc15d38b4877
|
||||
F test/walbig.test f437473a16cfb314867c6b5d1dbcd519e73e3434
|
||||
@ -968,7 +969,7 @@ F test/whereD.test 304ccbe3c77e0d0764f37c91d43b8c4792a5e02f
|
||||
F test/wherelimit.test 5e9fd41e79bb2b2d588ed999d641d9c965619b31
|
||||
F test/win32lock.test b2a539e85ae6b2d78475e016a9636b4451dc7fb9
|
||||
F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688
|
||||
F test/zerodamage.test 0de750389990b1078bab203c712dc3fefd1d8b82
|
||||
F test/zerodamage.test e7f77fded01dfcdf92ac2c5400f1e35d7a21463c
|
||||
F tool/build-all-msvc.bat 1a18aa39983ae7354d834bc55a850a54fc007576 x
|
||||
F tool/build-shell.sh b64a481901fc9ffe5ca8812a2a9255b6cfb77381
|
||||
F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
|
||||
@ -1012,7 +1013,7 @@ F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||
F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
|
||||
P bf8a9ca5b58404112a8af666f5840b462b7bbfe1
|
||||
R 847379dec46339e4d4e3d3e07e9871f0
|
||||
U drh
|
||||
Z a42f3ee2165757bae1503891985c3bca
|
||||
P 9402f81fade5fcae0a3a6efdc7a5cdf71fc2e79f
|
||||
R daf813c87e17f5252bebfe0af09b2572
|
||||
U mistachkin
|
||||
Z 66d6c356671ca3d281bc85c60ca24a37
|
||||
|
@ -1 +1 @@
|
||||
9402f81fade5fcae0a3a6efdc7a5cdf71fc2e79f
|
||||
c1a8557008e56aa9bcb4565e4178fc57295c563d
|
169
src/os_win.c
169
src/os_win.c
@ -24,6 +24,15 @@
|
||||
*/
|
||||
#include "os_common.h"
|
||||
|
||||
/*
|
||||
** Compiling and using WAL mode requires several APIs that are only
|
||||
** available in Windows platforms based on the NT kernel.
|
||||
*/
|
||||
#if !SQLITE_OS_WINNT && !defined(SQLITE_OMIT_WAL)
|
||||
# error "WAL mode requires support from the Windows NT kernel, compile\
|
||||
with SQLITE_OMIT_WAL."
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Macro to find the minimum of two numeric values.
|
||||
*/
|
||||
@ -308,6 +317,16 @@ static struct win_syscall {
|
||||
#define osCreateFileW ((HANDLE(WINAPI*)(LPCWSTR,DWORD,DWORD, \
|
||||
LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE))aSyscall[5].pCurrent)
|
||||
|
||||
#if (!SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_ANSI) && \
|
||||
!defined(SQLITE_OMIT_WAL))
|
||||
{ "CreateFileMappingA", (SYSCALL)CreateFileMappingA, 0 },
|
||||
#else
|
||||
{ "CreateFileMappingA", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osCreateFileMappingA ((HANDLE(WINAPI*)(HANDLE,LPSECURITY_ATTRIBUTES, \
|
||||
DWORD,DWORD,DWORD,LPCSTR))aSyscall[6].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINCE || (!SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) && \
|
||||
!defined(SQLITE_OMIT_WAL))
|
||||
{ "CreateFileMappingW", (SYSCALL)CreateFileMappingW, 0 },
|
||||
@ -316,7 +335,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osCreateFileMappingW ((HANDLE(WINAPI*)(HANDLE,LPSECURITY_ATTRIBUTES, \
|
||||
DWORD,DWORD,DWORD,LPCWSTR))aSyscall[6].pCurrent)
|
||||
DWORD,DWORD,DWORD,LPCWSTR))aSyscall[7].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "CreateMutexW", (SYSCALL)CreateMutexW, 0 },
|
||||
@ -325,7 +344,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osCreateMutexW ((HANDLE(WINAPI*)(LPSECURITY_ATTRIBUTES,BOOL, \
|
||||
LPCWSTR))aSyscall[7].pCurrent)
|
||||
LPCWSTR))aSyscall[8].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_ANSI)
|
||||
{ "DeleteFileA", (SYSCALL)DeleteFileA, 0 },
|
||||
@ -333,7 +352,7 @@ static struct win_syscall {
|
||||
{ "DeleteFileA", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osDeleteFileA ((BOOL(WINAPI*)(LPCSTR))aSyscall[8].pCurrent)
|
||||
#define osDeleteFileA ((BOOL(WINAPI*)(LPCSTR))aSyscall[9].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "DeleteFileW", (SYSCALL)DeleteFileW, 0 },
|
||||
@ -341,7 +360,7 @@ static struct win_syscall {
|
||||
{ "DeleteFileW", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osDeleteFileW ((BOOL(WINAPI*)(LPCWSTR))aSyscall[9].pCurrent)
|
||||
#define osDeleteFileW ((BOOL(WINAPI*)(LPCWSTR))aSyscall[10].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINCE
|
||||
{ "FileTimeToLocalFileTime", (SYSCALL)FileTimeToLocalFileTime, 0 },
|
||||
@ -350,7 +369,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osFileTimeToLocalFileTime ((BOOL(WINAPI*)(CONST FILETIME*, \
|
||||
LPFILETIME))aSyscall[10].pCurrent)
|
||||
LPFILETIME))aSyscall[11].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINCE
|
||||
{ "FileTimeToSystemTime", (SYSCALL)FileTimeToSystemTime, 0 },
|
||||
@ -359,11 +378,11 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osFileTimeToSystemTime ((BOOL(WINAPI*)(CONST FILETIME*, \
|
||||
LPSYSTEMTIME))aSyscall[11].pCurrent)
|
||||
LPSYSTEMTIME))aSyscall[12].pCurrent)
|
||||
|
||||
{ "FlushFileBuffers", (SYSCALL)FlushFileBuffers, 0 },
|
||||
|
||||
#define osFlushFileBuffers ((BOOL(WINAPI*)(HANDLE))aSyscall[12].pCurrent)
|
||||
#define osFlushFileBuffers ((BOOL(WINAPI*)(HANDLE))aSyscall[13].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_ANSI)
|
||||
{ "FormatMessageA", (SYSCALL)FormatMessageA, 0 },
|
||||
@ -372,7 +391,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osFormatMessageA ((DWORD(WINAPI*)(DWORD,LPCVOID,DWORD,DWORD,LPSTR, \
|
||||
DWORD,va_list*))aSyscall[13].pCurrent)
|
||||
DWORD,va_list*))aSyscall[14].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "FormatMessageW", (SYSCALL)FormatMessageW, 0 },
|
||||
@ -381,15 +400,15 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osFormatMessageW ((DWORD(WINAPI*)(DWORD,LPCVOID,DWORD,DWORD,LPWSTR, \
|
||||
DWORD,va_list*))aSyscall[14].pCurrent)
|
||||
DWORD,va_list*))aSyscall[15].pCurrent)
|
||||
|
||||
{ "FreeLibrary", (SYSCALL)FreeLibrary, 0 },
|
||||
|
||||
#define osFreeLibrary ((BOOL(WINAPI*)(HMODULE))aSyscall[15].pCurrent)
|
||||
#define osFreeLibrary ((BOOL(WINAPI*)(HMODULE))aSyscall[16].pCurrent)
|
||||
|
||||
{ "GetCurrentProcessId", (SYSCALL)GetCurrentProcessId, 0 },
|
||||
|
||||
#define osGetCurrentProcessId ((DWORD(WINAPI*)(VOID))aSyscall[16].pCurrent)
|
||||
#define osGetCurrentProcessId ((DWORD(WINAPI*)(VOID))aSyscall[17].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINCE && defined(SQLITE_WIN32_HAS_ANSI)
|
||||
{ "GetDiskFreeSpaceA", (SYSCALL)GetDiskFreeSpaceA, 0 },
|
||||
@ -398,7 +417,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetDiskFreeSpaceA ((BOOL(WINAPI*)(LPCSTR,LPDWORD,LPDWORD,LPDWORD, \
|
||||
LPDWORD))aSyscall[17].pCurrent)
|
||||
LPDWORD))aSyscall[18].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "GetDiskFreeSpaceW", (SYSCALL)GetDiskFreeSpaceW, 0 },
|
||||
@ -407,7 +426,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetDiskFreeSpaceW ((BOOL(WINAPI*)(LPCWSTR,LPDWORD,LPDWORD,LPDWORD, \
|
||||
LPDWORD))aSyscall[18].pCurrent)
|
||||
LPDWORD))aSyscall[19].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_ANSI)
|
||||
{ "GetFileAttributesA", (SYSCALL)GetFileAttributesA, 0 },
|
||||
@ -415,7 +434,7 @@ static struct win_syscall {
|
||||
{ "GetFileAttributesA", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osGetFileAttributesA ((DWORD(WINAPI*)(LPCSTR))aSyscall[19].pCurrent)
|
||||
#define osGetFileAttributesA ((DWORD(WINAPI*)(LPCSTR))aSyscall[20].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "GetFileAttributesW", (SYSCALL)GetFileAttributesW, 0 },
|
||||
@ -423,7 +442,7 @@ static struct win_syscall {
|
||||
{ "GetFileAttributesW", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osGetFileAttributesW ((DWORD(WINAPI*)(LPCWSTR))aSyscall[20].pCurrent)
|
||||
#define osGetFileAttributesW ((DWORD(WINAPI*)(LPCWSTR))aSyscall[21].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "GetFileAttributesExW", (SYSCALL)GetFileAttributesExW, 0 },
|
||||
@ -432,7 +451,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetFileAttributesExW ((BOOL(WINAPI*)(LPCWSTR,GET_FILEEX_INFO_LEVELS, \
|
||||
LPVOID))aSyscall[21].pCurrent)
|
||||
LPVOID))aSyscall[22].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "GetFileSize", (SYSCALL)GetFileSize, 0 },
|
||||
@ -440,7 +459,7 @@ static struct win_syscall {
|
||||
{ "GetFileSize", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osGetFileSize ((DWORD(WINAPI*)(HANDLE,LPDWORD))aSyscall[22].pCurrent)
|
||||
#define osGetFileSize ((DWORD(WINAPI*)(HANDLE,LPDWORD))aSyscall[23].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINCE && defined(SQLITE_WIN32_HAS_ANSI)
|
||||
{ "GetFullPathNameA", (SYSCALL)GetFullPathNameA, 0 },
|
||||
@ -449,7 +468,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetFullPathNameA ((DWORD(WINAPI*)(LPCSTR,DWORD,LPSTR, \
|
||||
LPSTR*))aSyscall[23].pCurrent)
|
||||
LPSTR*))aSyscall[24].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "GetFullPathNameW", (SYSCALL)GetFullPathNameW, 0 },
|
||||
@ -458,11 +477,11 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetFullPathNameW ((DWORD(WINAPI*)(LPCWSTR,DWORD,LPWSTR, \
|
||||
LPWSTR*))aSyscall[24].pCurrent)
|
||||
LPWSTR*))aSyscall[25].pCurrent)
|
||||
|
||||
{ "GetLastError", (SYSCALL)GetLastError, 0 },
|
||||
|
||||
#define osGetLastError ((DWORD(WINAPI*)(VOID))aSyscall[25].pCurrent)
|
||||
#define osGetLastError ((DWORD(WINAPI*)(VOID))aSyscall[26].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINCE
|
||||
/* The GetProcAddressA() routine is only available on Windows CE. */
|
||||
@ -474,7 +493,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetProcAddressA ((FARPROC(WINAPI*)(HMODULE, \
|
||||
LPCSTR))aSyscall[26].pCurrent)
|
||||
LPCSTR))aSyscall[27].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "GetSystemInfo", (SYSCALL)GetSystemInfo, 0 },
|
||||
@ -482,11 +501,11 @@ static struct win_syscall {
|
||||
{ "GetSystemInfo", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osGetSystemInfo ((VOID(WINAPI*)(LPSYSTEM_INFO))aSyscall[27].pCurrent)
|
||||
#define osGetSystemInfo ((VOID(WINAPI*)(LPSYSTEM_INFO))aSyscall[28].pCurrent)
|
||||
|
||||
{ "GetSystemTime", (SYSCALL)GetSystemTime, 0 },
|
||||
|
||||
#define osGetSystemTime ((VOID(WINAPI*)(LPSYSTEMTIME))aSyscall[28].pCurrent)
|
||||
#define osGetSystemTime ((VOID(WINAPI*)(LPSYSTEMTIME))aSyscall[29].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINCE
|
||||
{ "GetSystemTimeAsFileTime", (SYSCALL)GetSystemTimeAsFileTime, 0 },
|
||||
@ -495,7 +514,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetSystemTimeAsFileTime ((VOID(WINAPI*)( \
|
||||
LPFILETIME))aSyscall[29].pCurrent)
|
||||
LPFILETIME))aSyscall[30].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_ANSI)
|
||||
{ "GetTempPathA", (SYSCALL)GetTempPathA, 0 },
|
||||
@ -503,7 +522,7 @@ static struct win_syscall {
|
||||
{ "GetTempPathA", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osGetTempPathA ((DWORD(WINAPI*)(DWORD,LPSTR))aSyscall[30].pCurrent)
|
||||
#define osGetTempPathA ((DWORD(WINAPI*)(DWORD,LPSTR))aSyscall[31].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "GetTempPathW", (SYSCALL)GetTempPathW, 0 },
|
||||
@ -511,7 +530,7 @@ static struct win_syscall {
|
||||
{ "GetTempPathW", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osGetTempPathW ((DWORD(WINAPI*)(DWORD,LPWSTR))aSyscall[31].pCurrent)
|
||||
#define osGetTempPathW ((DWORD(WINAPI*)(DWORD,LPWSTR))aSyscall[32].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "GetTickCount", (SYSCALL)GetTickCount, 0 },
|
||||
@ -519,7 +538,7 @@ static struct win_syscall {
|
||||
{ "GetTickCount", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osGetTickCount ((DWORD(WINAPI*)(VOID))aSyscall[32].pCurrent)
|
||||
#define osGetTickCount ((DWORD(WINAPI*)(VOID))aSyscall[33].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_ANSI)
|
||||
{ "GetVersionExA", (SYSCALL)GetVersionExA, 0 },
|
||||
@ -528,12 +547,12 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetVersionExA ((BOOL(WINAPI*)( \
|
||||
LPOSVERSIONINFOA))aSyscall[33].pCurrent)
|
||||
LPOSVERSIONINFOA))aSyscall[34].pCurrent)
|
||||
|
||||
{ "HeapAlloc", (SYSCALL)HeapAlloc, 0 },
|
||||
|
||||
#define osHeapAlloc ((LPVOID(WINAPI*)(HANDLE,DWORD, \
|
||||
SIZE_T))aSyscall[34].pCurrent)
|
||||
SIZE_T))aSyscall[35].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "HeapCreate", (SYSCALL)HeapCreate, 0 },
|
||||
@ -542,7 +561,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osHeapCreate ((HANDLE(WINAPI*)(DWORD,SIZE_T, \
|
||||
SIZE_T))aSyscall[35].pCurrent)
|
||||
SIZE_T))aSyscall[36].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "HeapDestroy", (SYSCALL)HeapDestroy, 0 },
|
||||
@ -550,21 +569,21 @@ static struct win_syscall {
|
||||
{ "HeapDestroy", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osHeapDestroy ((BOOL(WINAPI*)(HANDLE))aSyscall[36].pCurrent)
|
||||
#define osHeapDestroy ((BOOL(WINAPI*)(HANDLE))aSyscall[37].pCurrent)
|
||||
|
||||
{ "HeapFree", (SYSCALL)HeapFree, 0 },
|
||||
|
||||
#define osHeapFree ((BOOL(WINAPI*)(HANDLE,DWORD,LPVOID))aSyscall[37].pCurrent)
|
||||
#define osHeapFree ((BOOL(WINAPI*)(HANDLE,DWORD,LPVOID))aSyscall[38].pCurrent)
|
||||
|
||||
{ "HeapReAlloc", (SYSCALL)HeapReAlloc, 0 },
|
||||
|
||||
#define osHeapReAlloc ((LPVOID(WINAPI*)(HANDLE,DWORD,LPVOID, \
|
||||
SIZE_T))aSyscall[38].pCurrent)
|
||||
SIZE_T))aSyscall[39].pCurrent)
|
||||
|
||||
{ "HeapSize", (SYSCALL)HeapSize, 0 },
|
||||
|
||||
#define osHeapSize ((SIZE_T(WINAPI*)(HANDLE,DWORD, \
|
||||
LPCVOID))aSyscall[39].pCurrent)
|
||||
LPCVOID))aSyscall[40].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "HeapValidate", (SYSCALL)HeapValidate, 0 },
|
||||
@ -573,7 +592,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osHeapValidate ((BOOL(WINAPI*)(HANDLE,DWORD, \
|
||||
LPCVOID))aSyscall[40].pCurrent)
|
||||
LPCVOID))aSyscall[41].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_ANSI)
|
||||
{ "LoadLibraryA", (SYSCALL)LoadLibraryA, 0 },
|
||||
@ -581,7 +600,7 @@ static struct win_syscall {
|
||||
{ "LoadLibraryA", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osLoadLibraryA ((HMODULE(WINAPI*)(LPCSTR))aSyscall[41].pCurrent)
|
||||
#define osLoadLibraryA ((HMODULE(WINAPI*)(LPCSTR))aSyscall[42].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "LoadLibraryW", (SYSCALL)LoadLibraryW, 0 },
|
||||
@ -589,7 +608,7 @@ static struct win_syscall {
|
||||
{ "LoadLibraryW", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osLoadLibraryW ((HMODULE(WINAPI*)(LPCWSTR))aSyscall[42].pCurrent)
|
||||
#define osLoadLibraryW ((HMODULE(WINAPI*)(LPCWSTR))aSyscall[43].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "LocalFree", (SYSCALL)LocalFree, 0 },
|
||||
@ -597,7 +616,7 @@ static struct win_syscall {
|
||||
{ "LocalFree", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osLocalFree ((HLOCAL(WINAPI*)(HLOCAL))aSyscall[43].pCurrent)
|
||||
#define osLocalFree ((HLOCAL(WINAPI*)(HLOCAL))aSyscall[44].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT
|
||||
{ "LockFile", (SYSCALL)LockFile, 0 },
|
||||
@ -607,7 +626,7 @@ static struct win_syscall {
|
||||
|
||||
#ifndef osLockFile
|
||||
#define osLockFile ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \
|
||||
DWORD))aSyscall[44].pCurrent)
|
||||
DWORD))aSyscall[45].pCurrent)
|
||||
#endif
|
||||
|
||||
#if !SQLITE_OS_WINCE
|
||||
@ -618,7 +637,7 @@ static struct win_syscall {
|
||||
|
||||
#ifndef osLockFileEx
|
||||
#define osLockFileEx ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD,DWORD, \
|
||||
LPOVERLAPPED))aSyscall[45].pCurrent)
|
||||
LPOVERLAPPED))aSyscall[46].pCurrent)
|
||||
#endif
|
||||
|
||||
#if SQLITE_OS_WINCE || (!SQLITE_OS_WINRT && !defined(SQLITE_OMIT_WAL))
|
||||
@ -628,26 +647,26 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osMapViewOfFile ((LPVOID(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \
|
||||
SIZE_T))aSyscall[46].pCurrent)
|
||||
SIZE_T))aSyscall[47].pCurrent)
|
||||
|
||||
{ "MultiByteToWideChar", (SYSCALL)MultiByteToWideChar, 0 },
|
||||
|
||||
#define osMultiByteToWideChar ((int(WINAPI*)(UINT,DWORD,LPCSTR,int,LPWSTR, \
|
||||
int))aSyscall[47].pCurrent)
|
||||
int))aSyscall[48].pCurrent)
|
||||
|
||||
{ "QueryPerformanceCounter", (SYSCALL)QueryPerformanceCounter, 0 },
|
||||
|
||||
#define osQueryPerformanceCounter ((BOOL(WINAPI*)( \
|
||||
LARGE_INTEGER*))aSyscall[48].pCurrent)
|
||||
LARGE_INTEGER*))aSyscall[49].pCurrent)
|
||||
|
||||
{ "ReadFile", (SYSCALL)ReadFile, 0 },
|
||||
|
||||
#define osReadFile ((BOOL(WINAPI*)(HANDLE,LPVOID,DWORD,LPDWORD, \
|
||||
LPOVERLAPPED))aSyscall[49].pCurrent)
|
||||
LPOVERLAPPED))aSyscall[50].pCurrent)
|
||||
|
||||
{ "SetEndOfFile", (SYSCALL)SetEndOfFile, 0 },
|
||||
|
||||
#define osSetEndOfFile ((BOOL(WINAPI*)(HANDLE))aSyscall[50].pCurrent)
|
||||
#define osSetEndOfFile ((BOOL(WINAPI*)(HANDLE))aSyscall[51].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "SetFilePointer", (SYSCALL)SetFilePointer, 0 },
|
||||
@ -656,7 +675,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osSetFilePointer ((DWORD(WINAPI*)(HANDLE,LONG,PLONG, \
|
||||
DWORD))aSyscall[51].pCurrent)
|
||||
DWORD))aSyscall[52].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "Sleep", (SYSCALL)Sleep, 0 },
|
||||
@ -664,12 +683,12 @@ static struct win_syscall {
|
||||
{ "Sleep", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osSleep ((VOID(WINAPI*)(DWORD))aSyscall[52].pCurrent)
|
||||
#define osSleep ((VOID(WINAPI*)(DWORD))aSyscall[53].pCurrent)
|
||||
|
||||
{ "SystemTimeToFileTime", (SYSCALL)SystemTimeToFileTime, 0 },
|
||||
|
||||
#define osSystemTimeToFileTime ((BOOL(WINAPI*)(CONST SYSTEMTIME*, \
|
||||
LPFILETIME))aSyscall[53].pCurrent)
|
||||
LPFILETIME))aSyscall[54].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT
|
||||
{ "UnlockFile", (SYSCALL)UnlockFile, 0 },
|
||||
@ -679,7 +698,7 @@ static struct win_syscall {
|
||||
|
||||
#ifndef osUnlockFile
|
||||
#define osUnlockFile ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \
|
||||
DWORD))aSyscall[54].pCurrent)
|
||||
DWORD))aSyscall[55].pCurrent)
|
||||
#endif
|
||||
|
||||
#if !SQLITE_OS_WINCE
|
||||
@ -689,7 +708,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osUnlockFileEx ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \
|
||||
LPOVERLAPPED))aSyscall[55].pCurrent)
|
||||
LPOVERLAPPED))aSyscall[56].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINCE || !defined(SQLITE_OMIT_WAL)
|
||||
{ "UnmapViewOfFile", (SYSCALL)UnmapViewOfFile, 0 },
|
||||
@ -697,17 +716,17 @@ static struct win_syscall {
|
||||
{ "UnmapViewOfFile", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osUnmapViewOfFile ((BOOL(WINAPI*)(LPCVOID))aSyscall[56].pCurrent)
|
||||
#define osUnmapViewOfFile ((BOOL(WINAPI*)(LPCVOID))aSyscall[57].pCurrent)
|
||||
|
||||
{ "WideCharToMultiByte", (SYSCALL)WideCharToMultiByte, 0 },
|
||||
|
||||
#define osWideCharToMultiByte ((int(WINAPI*)(UINT,DWORD,LPCWSTR,int,LPSTR,int, \
|
||||
LPCSTR,LPBOOL))aSyscall[57].pCurrent)
|
||||
LPCSTR,LPBOOL))aSyscall[58].pCurrent)
|
||||
|
||||
{ "WriteFile", (SYSCALL)WriteFile, 0 },
|
||||
|
||||
#define osWriteFile ((BOOL(WINAPI*)(HANDLE,LPCVOID,DWORD,LPDWORD, \
|
||||
LPOVERLAPPED))aSyscall[58].pCurrent)
|
||||
LPOVERLAPPED))aSyscall[59].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT
|
||||
{ "CreateEventExW", (SYSCALL)CreateEventExW, 0 },
|
||||
@ -716,7 +735,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osCreateEventExW ((HANDLE(WINAPI*)(LPSECURITY_ATTRIBUTES,LPCWSTR, \
|
||||
DWORD,DWORD))aSyscall[59].pCurrent)
|
||||
DWORD,DWORD))aSyscall[60].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT
|
||||
{ "WaitForSingleObject", (SYSCALL)WaitForSingleObject, 0 },
|
||||
@ -725,7 +744,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osWaitForSingleObject ((DWORD(WINAPI*)(HANDLE, \
|
||||
DWORD))aSyscall[60].pCurrent)
|
||||
DWORD))aSyscall[61].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT
|
||||
{ "WaitForSingleObjectEx", (SYSCALL)WaitForSingleObjectEx, 0 },
|
||||
@ -734,7 +753,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osWaitForSingleObjectEx ((DWORD(WINAPI*)(HANDLE,DWORD, \
|
||||
BOOL))aSyscall[61].pCurrent)
|
||||
BOOL))aSyscall[62].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT
|
||||
{ "SetFilePointerEx", (SYSCALL)SetFilePointerEx, 0 },
|
||||
@ -743,7 +762,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osSetFilePointerEx ((BOOL(WINAPI*)(HANDLE,LARGE_INTEGER, \
|
||||
PLARGE_INTEGER,DWORD))aSyscall[62].pCurrent)
|
||||
PLARGE_INTEGER,DWORD))aSyscall[63].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT
|
||||
{ "GetFileInformationByHandleEx", (SYSCALL)GetFileInformationByHandleEx, 0 },
|
||||
@ -752,7 +771,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetFileInformationByHandleEx ((BOOL(WINAPI*)(HANDLE, \
|
||||
FILE_INFO_BY_HANDLE_CLASS,LPVOID,DWORD))aSyscall[63].pCurrent)
|
||||
FILE_INFO_BY_HANDLE_CLASS,LPVOID,DWORD))aSyscall[64].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT && !defined(SQLITE_OMIT_WAL)
|
||||
{ "MapViewOfFileFromApp", (SYSCALL)MapViewOfFileFromApp, 0 },
|
||||
@ -761,7 +780,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osMapViewOfFileFromApp ((LPVOID(WINAPI*)(HANDLE,ULONG,ULONG64, \
|
||||
SIZE_T))aSyscall[64].pCurrent)
|
||||
SIZE_T))aSyscall[65].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT
|
||||
{ "CreateFile2", (SYSCALL)CreateFile2, 0 },
|
||||
@ -770,7 +789,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osCreateFile2 ((HANDLE(WINAPI*)(LPCWSTR,DWORD,DWORD,DWORD, \
|
||||
LPCREATEFILE2_EXTENDED_PARAMETERS))aSyscall[65].pCurrent)
|
||||
LPCREATEFILE2_EXTENDED_PARAMETERS))aSyscall[66].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT
|
||||
{ "LoadPackagedLibrary", (SYSCALL)LoadPackagedLibrary, 0 },
|
||||
@ -779,7 +798,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osLoadPackagedLibrary ((HMODULE(WINAPI*)(LPCWSTR, \
|
||||
DWORD))aSyscall[66].pCurrent)
|
||||
DWORD))aSyscall[67].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT
|
||||
{ "GetTickCount64", (SYSCALL)GetTickCount64, 0 },
|
||||
@ -787,7 +806,7 @@ static struct win_syscall {
|
||||
{ "GetTickCount64", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osGetTickCount64 ((ULONGLONG(WINAPI*)(VOID))aSyscall[67].pCurrent)
|
||||
#define osGetTickCount64 ((ULONGLONG(WINAPI*)(VOID))aSyscall[68].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT
|
||||
{ "GetNativeSystemInfo", (SYSCALL)GetNativeSystemInfo, 0 },
|
||||
@ -796,7 +815,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osGetNativeSystemInfo ((VOID(WINAPI*)( \
|
||||
LPSYSTEM_INFO))aSyscall[68].pCurrent)
|
||||
LPSYSTEM_INFO))aSyscall[69].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_ANSI)
|
||||
{ "OutputDebugStringA", (SYSCALL)OutputDebugStringA, 0 },
|
||||
@ -804,7 +823,7 @@ static struct win_syscall {
|
||||
{ "OutputDebugStringA", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osOutputDebugStringA ((VOID(WINAPI*)(LPCSTR))aSyscall[69].pCurrent)
|
||||
#define osOutputDebugStringA ((VOID(WINAPI*)(LPCSTR))aSyscall[70].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_WIDE)
|
||||
{ "OutputDebugStringW", (SYSCALL)OutputDebugStringW, 0 },
|
||||
@ -812,11 +831,11 @@ static struct win_syscall {
|
||||
{ "OutputDebugStringW", (SYSCALL)0, 0 },
|
||||
#endif
|
||||
|
||||
#define osOutputDebugStringW ((VOID(WINAPI*)(LPCWSTR))aSyscall[70].pCurrent)
|
||||
#define osOutputDebugStringW ((VOID(WINAPI*)(LPCWSTR))aSyscall[71].pCurrent)
|
||||
|
||||
{ "GetProcessHeap", (SYSCALL)GetProcessHeap, 0 },
|
||||
|
||||
#define osGetProcessHeap ((HANDLE(WINAPI*)(VOID))aSyscall[71].pCurrent)
|
||||
#define osGetProcessHeap ((HANDLE(WINAPI*)(VOID))aSyscall[72].pCurrent)
|
||||
|
||||
#if SQLITE_OS_WINRT && !defined(SQLITE_OMIT_WAL)
|
||||
{ "CreateFileMappingFromApp", (SYSCALL)CreateFileMappingFromApp, 0 },
|
||||
@ -825,7 +844,7 @@ static struct win_syscall {
|
||||
#endif
|
||||
|
||||
#define osCreateFileMappingFromApp ((HANDLE(WINAPI*)(HANDLE, \
|
||||
LPSECURITY_ATTRIBUTES,ULONG,ULONG64,LPCWSTR))aSyscall[72].pCurrent)
|
||||
LPSECURITY_ATTRIBUTES,ULONG,ULONG64,LPCWSTR))aSyscall[73].pCurrent)
|
||||
|
||||
}; /* End of the overrideable system calls */
|
||||
|
||||
@ -983,6 +1002,8 @@ void sqlite3_win32_sleep(DWORD milliseconds){
|
||||
*/
|
||||
#if SQLITE_OS_WINCE || SQLITE_OS_WINRT
|
||||
# define isNT() (1)
|
||||
#elif !defined(SQLITE_WIN32_HAS_WIDE)
|
||||
# define isNT() (0)
|
||||
#else
|
||||
static int isNT(void){
|
||||
if( sqlite3_os_type==0 ){
|
||||
@ -993,7 +1014,7 @@ void sqlite3_win32_sleep(DWORD milliseconds){
|
||||
}
|
||||
return sqlite3_os_type==2;
|
||||
}
|
||||
#endif /* SQLITE_OS_WINCE */
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_WIN32_MALLOC
|
||||
/*
|
||||
@ -3280,17 +3301,21 @@ static int winShmMap(
|
||||
pShmNode->aRegion = apNew;
|
||||
|
||||
while( pShmNode->nRegion<=iRegion ){
|
||||
HANDLE hMap; /* file-mapping handle */
|
||||
HANDLE hMap = NULL; /* file-mapping handle */
|
||||
void *pMap = 0; /* Mapped memory region */
|
||||
|
||||
#if SQLITE_OS_WINRT
|
||||
hMap = osCreateFileMappingFromApp(pShmNode->hFile.h,
|
||||
NULL, PAGE_READWRITE, nByte, NULL
|
||||
);
|
||||
#else
|
||||
#elif defined(SQLITE_WIN32_HAS_WIDE)
|
||||
hMap = osCreateFileMappingW(pShmNode->hFile.h,
|
||||
NULL, PAGE_READWRITE, 0, nByte, NULL
|
||||
);
|
||||
#elif defined(SQLITE_WIN32_HAS_ANSI)
|
||||
hMap = osCreateFileMappingA(pShmNode->hFile.h,
|
||||
NULL, PAGE_READWRITE, 0, nByte, NULL
|
||||
);
|
||||
#endif
|
||||
OSTRACE(("SHM-MAP pid-%d create region=%d nbyte=%d %s\n",
|
||||
(int)osGetCurrentProcessId(), pShmNode->nRegion, nByte,
|
||||
@ -4351,7 +4376,7 @@ int sqlite3_os_init(void){
|
||||
|
||||
/* Double-check that the aSyscall[] array has been constructed
|
||||
** correctly. See ticket [bb3a86e890c8e96ab] */
|
||||
assert( ArraySize(aSyscall)==73 );
|
||||
assert( ArraySize(aSyscall)==74 );
|
||||
|
||||
#ifndef SQLITE_OMIT_WAL
|
||||
/* get memory map allocation granularity */
|
||||
@ -4370,7 +4395,7 @@ int sqlite3_os_init(void){
|
||||
|
||||
int sqlite3_os_end(void){
|
||||
#if SQLITE_OS_WINRT
|
||||
if( sleepObj != NULL ){
|
||||
if( sleepObj!=NULL ){
|
||||
osCloseHandle(sleepObj);
|
||||
sleepObj = NULL;
|
||||
}
|
||||
|
@ -214,6 +214,7 @@ unset ::incompatible
|
||||
do_allbackcompat_test {
|
||||
if {[code1 {sqlite3 -version}] >= "3.7.0"
|
||||
&& [code2 {sqlite3 -version}] >= "3.7.0"
|
||||
&& [capable wal]
|
||||
} {
|
||||
|
||||
do_test backcompat-2.1.1 { sql1 {
|
||||
|
@ -85,10 +85,12 @@ do_test 2.3 { db_write db 1 } {0 4 0}
|
||||
do_test 2.4 { db_write db 0 } {0 0 0}
|
||||
do_test 2.5 { db_write db 1 } {0 0 0}
|
||||
|
||||
do_test 2.6 {
|
||||
execsql { PRAGMA journal_mode = WAL }
|
||||
db_write db 1
|
||||
} {0 1 0}
|
||||
ifcapable wal {
|
||||
do_test 2.6 {
|
||||
execsql { PRAGMA journal_mode = WAL }
|
||||
db_write db 1
|
||||
} {0 1 0}
|
||||
}
|
||||
do_test 2.7 {
|
||||
execsql { INSERT INTO t1 VALUES(5, randomblob(600)) }
|
||||
db_write db
|
||||
|
20
test/full.test
Normal file
20
test/full.test
Normal file
@ -0,0 +1,20 @@
|
||||
# 2012 September 12
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
# This file runs the "full" test suite. It is a peer of the quick.test
|
||||
# and all.test scripts.
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/permutations.test
|
||||
|
||||
run_test_suite full
|
||||
|
||||
finish_test
|
@ -96,7 +96,7 @@ if {$::tcl_platform(platform)!="unix"} {
|
||||
set alltests [test_set $alltests -exclude {
|
||||
all.test async.test quick.test veryquick.test
|
||||
memleak.test permutations.test soak.test fts3.test
|
||||
mallocAll.test rtree.test
|
||||
mallocAll.test rtree.test full.test
|
||||
}]
|
||||
|
||||
set allquicktests [test_set $alltests -exclude {
|
||||
|
@ -31,6 +31,7 @@
|
||||
# Test the capability of the SQLite version built into the interpreter to
|
||||
# determine if a specific test can be run:
|
||||
#
|
||||
# capable EXPR
|
||||
# ifcapable EXPR
|
||||
#
|
||||
# Calulate checksums based on database contents:
|
||||
@ -134,7 +135,7 @@ proc getFileRetries {} {
|
||||
# NOTE: Return the default number of retries for [file] operations. A
|
||||
# value of zero or less here means "disabled".
|
||||
#
|
||||
return [expr {$::tcl_platform(platform) eq "windows" ? 10 : 0}]
|
||||
return [expr {$::tcl_platform(platform) eq "windows" ? 50 : 0}]
|
||||
}
|
||||
return $::G(file-retries)
|
||||
}
|
||||
@ -547,6 +548,9 @@ proc do_test {name cmd expected} {
|
||||
set ok [expr {[string compare $result $expected]==0}]
|
||||
}
|
||||
if {!$ok} {
|
||||
# if {![info exists ::testprefix] || $::testprefix eq ""} {
|
||||
# error "no test prefix"
|
||||
# }
|
||||
puts "\nExpected: \[$expected\]\n Got: \[$result\]"
|
||||
fail_test $name
|
||||
} else {
|
||||
@ -994,6 +998,12 @@ proc fix_ifcapable_expr {expr} {
|
||||
return $ret
|
||||
}
|
||||
|
||||
# Returns non-zero if the capabilities are present; zero otherwise.
|
||||
#
|
||||
proc capable {expr} {
|
||||
set e [fix_ifcapable_expr $expr]; return [expr ($e)]
|
||||
}
|
||||
|
||||
# Evaluate a boolean expression of capabilities. If true, execute the
|
||||
# code. Omit the code if false.
|
||||
#
|
||||
|
@ -17,6 +17,8 @@
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
source $testdir/lock_common.tcl
|
||||
set ::testprefix tkt-5d863f876e
|
||||
ifcapable !wal {finish_test ; return }
|
||||
|
||||
do_multiclient_test tn {
|
||||
do_test $tn.1 {
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
set ::testprefix tkt-80ba2
|
||||
set ::testprefix tkt-80ba201079
|
||||
|
||||
do_test tkt-80ba2-100 {
|
||||
db eval {
|
||||
|
@ -26,6 +26,7 @@
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
set ::testprefix wal8
|
||||
ifcapable !wal {finish_test ; return }
|
||||
|
||||
db close
|
||||
forcedelete test.db test.db-wal
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
set testprefix wal5
|
||||
set testprefix zerodamage
|
||||
|
||||
ifcapable !vtab {
|
||||
finish_test
|
||||
@ -89,31 +89,33 @@ do_test zerodamage-2.1 {
|
||||
concat [file_control_powersafe_overwrite db -1] [set ::max_journal_size]
|
||||
} {0 0 24704}
|
||||
|
||||
# Run a WAL-mode transaction with POWERSAFE_OVERWRITE on to verify that the
|
||||
# WAL file does not get too big.
|
||||
#
|
||||
do_test zerodamage-3.0 {
|
||||
db eval {
|
||||
PRAGMA journal_mode=WAL;
|
||||
}
|
||||
db close
|
||||
sqlite3 db file:test.db?psow=TRUE -uri 1
|
||||
db eval {
|
||||
UPDATE t1 SET y=randomblob(50) WHERE x=124;
|
||||
}
|
||||
file size test.db-wal
|
||||
} {1080}
|
||||
ifcapable wal {
|
||||
# Run a WAL-mode transaction with POWERSAFE_OVERWRITE on to verify that the
|
||||
# WAL file does not get too big.
|
||||
#
|
||||
do_test zerodamage-3.0 {
|
||||
db eval {
|
||||
PRAGMA journal_mode=WAL;
|
||||
}
|
||||
db close
|
||||
sqlite3 db file:test.db?psow=TRUE -uri 1
|
||||
db eval {
|
||||
UPDATE t1 SET y=randomblob(50) WHERE x=124;
|
||||
}
|
||||
file size test.db-wal
|
||||
} {1080}
|
||||
|
||||
# Repeat the previous with POWERSAFE_OVERWRITE off. Verify that the WAL file
|
||||
# is padded.
|
||||
#
|
||||
do_test zerodamage-3.1 {
|
||||
db close
|
||||
sqlite3 db file:test.db?psow=FALSE -uri 1
|
||||
db eval {
|
||||
UPDATE t1 SET y=randomblob(50) WHERE x=124;
|
||||
}
|
||||
file size test.db-wal
|
||||
} {8416}
|
||||
# Repeat the previous with POWERSAFE_OVERWRITE off. Verify that the WAL file
|
||||
# is padded.
|
||||
#
|
||||
do_test zerodamage-3.1 {
|
||||
db close
|
||||
sqlite3 db file:test.db?psow=FALSE -uri 1
|
||||
db eval {
|
||||
UPDATE t1 SET y=randomblob(50) WHERE x=124;
|
||||
}
|
||||
file size test.db-wal
|
||||
} {8416}
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
Loading…
Reference in New Issue
Block a user