diff --git a/manifest b/manifest index 6999191df1..3f3ccd9648 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Corrections\sto\stest\snames\sto\seliminate\sduplicates\sand\sfollow\snaming\sconventions. -D 2012-10-07T05:34:39.472 +C Manually\sdefine\sthe\sWin32\sfile-mapping\sAPIs\sfor\sWAL\sif\sSQLITE_WIN32_FILEMAPPING_API\sis\sdefined. +D 2012-10-08T14:36:42.399 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5f4f26109f9d80829122e0e09f9cda008fa065fb F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -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 a5a45a2857c43b37bac145b521064a85a544cd7a -F src/os_win.c 44f39059279dfd40ead4f259001420105c20e710 +F src/os_win.c 28bd027791252a4012dffd4d64355a1eb84d761c F src/pager.c a7ad8c38809edf0be545e8f52da5bcbb88885b38 F src/pager.h bdbc379557eb2e233dfec10986b3086877e72db7 F src/parse.y f29df90bd3adc64b33114ab1de9fb7768fcf2099 @@ -1019,7 +1019,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9 -P 4b0facc13b1026419f9b89dab3453ba43071455c -R 963a11ab0ec405d25d1ad37b4f26863a +P 50679889c75cd3205253b1682abfbddc5ff09175 585e2070eef3bc273f23d8e384a1261ee5fff5bd +R 503e44f3173c52a30e9073d66f146916 U mistachkin -Z 2db2f94384e1edd2a3e02fd4f28955ba +Z df468ad55877f504a34141d09c9c3204 diff --git a/manifest.uuid b/manifest.uuid index 0d8ab7fd78..431d08340f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -50679889c75cd3205253b1682abfbddc5ff09175 \ No newline at end of file +1c2c0a2880dd0ee8862352e307142b8de7e80d13 \ No newline at end of file diff --git a/src/os_win.c b/src/os_win.c index 352fe06b48..2d4c74af9a 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -33,6 +33,57 @@ with SQLITE_OMIT_WAL." #endif +/* +** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions +** based on the sub-platform)? +*/ +#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT +# define SQLITE_WIN32_HAS_ANSI +#endif + +/* +** Are most of the Win32 Unicode APIs available (i.e. with certain exceptions +** based on the sub-platform)? +*/ +#if SQLITE_OS_WINCE || SQLITE_OS_WINNT || SQLITE_OS_WINRT +# define SQLITE_WIN32_HAS_WIDE +#endif + +/* +** Do we need to manually define the Win32 file mapping APIs for use with WAL +** mode (e.g. these APIs are available in the Windows CE SDK; however, they +** are not present in the header file)? +*/ +#if SQLITE_WIN32_FILEMAPPING_API && !defined(SQLITE_OMIT_WAL) +/* +** Two of the file mapping APIs are different under WinRT. Figure out which +** set we need. +*/ +#if SQLITE_OS_WINRT +WINBASEAPI HANDLE WINAPI CreateFileMappingFromApp(HANDLE, \ + LPSECURITY_ATTRIBUTES, ULONG, ULONG64, LPCWSTR); + +WINBASEAPI LPVOID WINAPI MapViewOfFileFromApp(HANDLE, ULONG, ULONG64, SIZE_T); +#else +#if defined(SQLITE_WIN32_HAS_ANSI) +WINBASEAPI HANDLE WINAPI CreateFileMappingA(HANDLE, LPSECURITY_ATTRIBUTES, \ + DWORD, DWORD, DWORD, LPCSTR); +#endif /* defined(SQLITE_WIN32_HAS_ANSI) */ + +#if defined(SQLITE_WIN32_HAS_WIDE) +WINBASEAPI HANDLE WINAPI CreateFileMappingW(HANDLE, LPSECURITY_ATTRIBUTES, \ + DWORD, DWORD, DWORD, LPCWSTR); +#endif /* defined(SQLITE_WIN32_HAS_WIDE) */ + +WINBASEAPI LPVOID WINAPI MapViewOfFile(HANDLE, DWORD, DWORD, DWORD, SIZE_T); +#endif /* SQLITE_OS_WINRT */ + +/* +** This file mapping API is common to both Win32 and WinRT. +*/ +WINBASEAPI BOOL WINAPI UnmapViewOfFile(LPCVOID); +#endif /* SQLITE_WIN32_FILEMAPPING_API && !defined(SQLITE_OMIT_WAL) */ + /* ** Macro to find the minimum of two numeric values. */ @@ -238,14 +289,6 @@ int sqlite3_os_type = 0; static int sqlite3_os_type = 0; #endif -#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT -# define SQLITE_WIN32_HAS_ANSI -#endif - -#if SQLITE_OS_WINCE || SQLITE_OS_WINNT || SQLITE_OS_WINRT -# define SQLITE_WIN32_HAS_WIDE -#endif - #ifndef SYSCALL # define SYSCALL sqlite3_syscall_ptr #endif