]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Manually define the Win32 file-mapping APIs for WAL if SQLITE_WIN32_FILEMAPPING_API... winFileMapping
authormistachkin <mistachkin@noemail.net>
Sun, 7 Oct 2012 00:52:22 +0000 (00:52 +0000)
committermistachkin <mistachkin@noemail.net>
Sun, 7 Oct 2012 00:52:22 +0000 (00:52 +0000)
FossilOrigin-Name: 585e2070eef3bc273f23d8e384a1261ee5fff5bd

manifest
manifest.uuid
src/os_win.c

index 24d29501c44be1a02914d2e00ed42cc9d2aebc82..0f8673d4629cccb9f1a7054a8a4df05e33794829 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Changes\sfor\sWinRT\scompatibility.\s\sAlso,\sallow\sversion\sresource\scompilation\sand\sembedding\sto\sbe\sdisabled\sat\scompile-time.
-D 2012-10-06T03:48:25.094
+C Manually\sdefine\sthe\sWin32\sfile-mapping\sAPIs\sfor\sWAL\sif\sSQLITE_WIN32_FILEMAPPING_API\sis\sdefined.
+D 2012-10-07T00:52:22.053
 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 8a549824ca5cf85a06b550fa95090fa911c4e5ee
 F src/pager.c a7ad8c38809edf0be545e8f52da5bcbb88885b38
 F src/pager.h bdbc379557eb2e233dfec10986b3086877e72db7
 F src/parse.y f29df90bd3adc64b33114ab1de9fb7768fcf2099
@@ -1019,7 +1019,10 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
-P e0c889d66ccf4af12cc77ac38c1e6477da63ac72
-R 7aa3a9ae530d62ad432ec99f0941dd9b
+P 4b0facc13b1026419f9b89dab3453ba43071455c
+R 3a4914baa2fdfc1f1361069820af579b
+T *branch * winFileMapping
+T *sym-winFileMapping *
+T -sym-trunk *
 U mistachkin
-Z dfd5a7d9cdc76e6d57eba7e1ef9d075b
+Z 4c6d5f7ae10ca61313253da78e41bee6
index aebbf63d72c33f4ccee4887c72e2a4abab8a8e62..6dd9adc3a2cad9c0de9c5b8210972ac2db997763 100644 (file)
@@ -1 +1 @@
-4b0facc13b1026419f9b89dab3453ba43071455c
\ No newline at end of file
+585e2070eef3bc273f23d8e384a1261ee5fff5bd
\ No newline at end of file
index 352fe06b48157f008b07cb42d28ec8c54ef4cb33..0463b3eb23fe3ee1d9d06d6fa3995f1cd38ce918 100644 (file)
  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
+HANDLE WINAPI CreateFileMappingFromApp(HANDLE, LPSECURITY_ATTRIBUTES, \
+        ULONG, ULONG64, LPCWSTR);
+
+LPVOID WINAPI MapViewOfFileFromApp(HANDLE, ULONG, ULONG64, SIZE_T);
+#else
+#if defined(SQLITE_WIN32_HAS_ANSI)
+HANDLE WINAPI CreateFileMappingA(HANDLE, LPSECURITY_ATTRIBUTES, DWORD, \
+        DWORD, DWORD, LPCSTR);
+#endif /* defined(SQLITE_WIN32_HAS_ANSI) */
+
+#if defined(SQLITE_WIN32_HAS_WIDE)
+HANDLE WINAPI CreateFileMappingW(HANDLE, LPSECURITY_ATTRIBUTES, DWORD, \
+        DWORD, DWORD, LPCWSTR);
+#endif /* defined(SQLITE_WIN32_HAS_WIDE) */
+
+LPVOID WINAPI MapViewOfFile(HANDLE, DWORD, DWORD, DWORD, SIZE_T);
+#endif /* SQLITE_OS_WINRT */
+
+/*
+** This file mapping API is common to both Win32 and WinRT.
+*/
+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