diff --git a/Makefile.in b/Makefile.in index a0217c4343..d96d30ae86 100644 --- a/Makefile.in +++ b/Makefile.in @@ -241,6 +241,7 @@ SRC = \ $(TOP)/src/os_common.h \ $(TOP)/src/os_unix.c \ $(TOP)/src/os_win.c \ + $(TOP)/src/os_win.h \ $(TOP)/src/pager.c \ $(TOP)/src/pager.h \ $(TOP)/src/parse.y \ @@ -457,6 +458,7 @@ HDR = \ opcodes.h \ $(TOP)/src/os.h \ $(TOP)/src/os_common.h \ + $(TOP)/src/os_win.h \ $(TOP)/src/pager.h \ $(TOP)/src/pcache.h \ parse.h \ diff --git a/Makefile.msc b/Makefile.msc index 437cb0eac3..afe66baad8 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -628,6 +628,7 @@ SRC = \ $(TOP)\src\os_common.h \ $(TOP)\src\os_unix.c \ $(TOP)\src\os_win.c \ + $(TOP)\src\os_win.h \ $(TOP)\src\pager.c \ $(TOP)\src\pager.h \ $(TOP)\src\parse.y \ @@ -847,6 +848,7 @@ HDR = \ opcodes.h \ $(TOP)\src\os.h \ $(TOP)\src\os_common.h \ + $(TOP)\src\os_win.h \ $(TOP)\src\pager.h \ $(TOP)\src\pcache.h \ parse.h \ diff --git a/Makefile.vxworks b/Makefile.vxworks index c9058da3e5..70b9bdde6b 100644 --- a/Makefile.vxworks +++ b/Makefile.vxworks @@ -264,6 +264,7 @@ SRC = \ $(TOP)/src/os_common.h \ $(TOP)/src/os_unix.c \ $(TOP)/src/os_win.c \ + $(TOP)/src/os_win.h \ $(TOP)/src/pager.c \ $(TOP)/src/pager.h \ $(TOP)/src/parse.y \ @@ -416,6 +417,7 @@ HDR = \ opcodes.h \ $(TOP)/src/os.h \ $(TOP)/src/os_common.h \ + $(TOP)/src/os_win.h \ $(TOP)/src/pager.h \ $(TOP)/src/pcache.h \ parse.h \ diff --git a/main.mk b/main.mk index 41d1743832..4992de549b 100644 --- a/main.mk +++ b/main.mk @@ -123,6 +123,7 @@ SRC = \ $(TOP)/src/os_common.h \ $(TOP)/src/os_unix.c \ $(TOP)/src/os_win.c \ + $(TOP)/src/os_win.h \ $(TOP)/src/pager.c \ $(TOP)/src/pager.h \ $(TOP)/src/parse.y \ @@ -339,6 +340,7 @@ HDR = \ opcodes.h \ $(TOP)/src/os.h \ $(TOP)/src/os_common.h \ + $(TOP)/src/os_win.h \ $(TOP)/src/pager.h \ $(TOP)/src/pcache.h \ parse.h \ diff --git a/manifest b/manifest index aa2b98cdb9..41499ad4d0 100644 --- a/manifest +++ b/manifest @@ -1,10 +1,10 @@ -C Add\sthe\s--scratch\sparameter\sto\sspeedtest1.\s\sImproved\serror\smessages\swhen\nmisconfiguring\smemory\sparameters\sin\sspeedtest1. -D 2013-11-24T01:14:14.123 +C Initial\swork\son\sisolating\susage\sof\sthe\sWindows\sheader\sfile. +D 2013-11-25T09:36:07.707 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in e1a9b4258bbde53f5636f4e238c65b7e11459e2b +F Makefile.in 16254fb023b7e69788013f0da5ccdc2063ba2328 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc a6247094079f3ef97dcd7a69d0e13ff718c7073e -F Makefile.vxworks db21ed42a01d5740e656b16f92cb5d8d5e5dd315 +F Makefile.msc 7e91dccedae82c45dbf91a4e8240c642c2b90c83 +F Makefile.vxworks f921bd6a0600e36d67da080d820ae712ab393f30 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6 F VERSION 52f7e22bfcec71a462e34194b4ae1671380fde59 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -142,7 +142,7 @@ F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt f439556c5ce01ced70987e5ee86549a45165d9ff -F main.mk 82fd90375561d7b66287ae5a8b09e1e027394019 +F main.mk c9b6d61c55f461543244d63992c63037c3f11dac F mkdll.sh 7d09b23c05d56532e9d44a50868eb4b12ff4f74a F mkextu.sh 416f9b7089d80e5590a29692c9d9280a10dbad9f F mkextw.sh d2a981497b404d6498f5ff3e3b1f3816bdfcb338 @@ -200,13 +200,14 @@ F src/mutex.c d3b66a569368015e0fcb1ac15f81c119f504d3bc F src/mutex.h 5bc526e19dccc412b7ff04642f6fdad3fdfdabea F src/mutex_noop.c 7682796b7d8d39bf1c138248858efcd10c9e1553 F src/mutex_unix.c c3a4e00f96ba068a8dbef34084465979aaf369cc -F src/mutex_w32.c 6108c88e1cb38d8fbb3534b170793815cbedbf97 +F src/mutex_w32.c ab08c0fc54b71979370ca7c8f42fc64a9f211ebb F src/notify.c 976dd0f6171d4588e89e874fcc765e92914b6d30 F src/os.c b4ad71336fd96f97776f75587cd9e8218288f5be -F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f +F src/os.h cd8fd6545d6a936bae05026136324ec8e620c7f8 F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 F src/os_unix.c 143624d9eabb3b997c59cf594e0d06c56edd43e9 -F src/os_win.c ef091b347d682cb24fc575ac9a6290341af62e2b +F src/os_win.c 423d8f815067f4980cb84abab501374afc9bd039 +F src/os_win.h db1d1d18f56ea2931ba1c2ec25ff4616ae1e581b F src/pager.c 2aa4444ffe86e9282d03bc349a4a5e49bd77c0e8 F src/pager.h f094af9f6ececfaa8a1e93876905a4f34233fb0c F src/parse.y acee1a9958539e21263362b194594c5255ad2fca @@ -1111,10 +1112,10 @@ F tool/mkkeywordhash.c 189d76644e373c7d0864c628deb8ce7b4f403591 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e F tool/mkpragmatab.tcl 78a77b2c554d534c6f2dc903130186ed15715460 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 -F tool/mksqlite3c-noext.tcl 8bce31074e4cbe631bb7676526a048335f4c9f02 -F tool/mksqlite3c.tcl e2ba20d3f690990079d17f3e5a7417dfb7ada543 +F tool/mksqlite3c-noext.tcl 1407684f6781496421be53841f1259303f0c8be9 +F tool/mksqlite3c.tcl c6b22da4d4ee272afda33f0aeb896d9c2e26dc95 F tool/mksqlite3h.tcl ba24038056f51fde07c0079c41885ab85e2cff12 -F tool/mksqlite3internalh.tcl 3dca7bb5374cee003379b8cbac73714f610ef795 +F tool/mksqlite3internalh.tcl ba0532989220eaef044cbb8c0108eca623d23bbc F tool/mkvsix.tcl 6477fb9dab838b7eea1eed50658ff1cda04850b5 F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091 F tool/omittest.tcl 4665982e95a6e5c1bd806cf7bc3dea95be422d77 @@ -1142,7 +1143,10 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff -P 12e612e8e7c4a6f83acf0daf5608151fb5ec1575 -R d231270eb8540c71c1fe43ad7f945ecf -U drh -Z 904197ecb3cb4ac430a652007d0a071c +P 8f3c767a30c552548ead104ca125f182ce4849ad +R e592d18e44da45424fc95ed6d55c4c01 +T *branch * winHdr +T *sym-winHdr * +T -sym-trunk * +U mistachkin +Z 4118ce5841a2a285e11b8bcc9d8fe99e diff --git a/manifest.uuid b/manifest.uuid index 7967f97b83..586356026f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8f3c767a30c552548ead104ca125f182ce4849ad \ No newline at end of file +0d42c6b830ee50f45539d73e3948ed3bc50a11d1 \ No newline at end of file diff --git a/src/mutex_w32.c b/src/mutex_w32.c index 4b88c17452..2eb852413e 100644 --- a/src/mutex_w32.c +++ b/src/mutex_w32.c @@ -19,6 +19,11 @@ */ #ifdef SQLITE_MUTEX_W32 +/* +** Include the header file for the Windows VFS. +*/ +#include "os_win.h" + /* ** Each recursive mutex is an instance of the following structure. */ diff --git a/src/os.h b/src/os.h index 070a2ddd17..1d438d22cd 100644 --- a/src/os.h +++ b/src/os.h @@ -56,49 +56,6 @@ # endif #endif -#if SQLITE_OS_WIN -# include -#endif - -/* -** Determine if we are dealing with Windows NT. -** -** We ought to be able to determine if we are compiling for win98 or winNT -** using the _WIN32_WINNT macro as follows: -** -** #if defined(_WIN32_WINNT) -** # define SQLITE_OS_WINNT 1 -** #else -** # define SQLITE_OS_WINNT 0 -** #endif -** -** However, vs2005 does not set _WIN32_WINNT by default, as it ought to, -** so the above test does not work. We'll just assume that everything is -** winNT unless the programmer explicitly says otherwise by setting -** SQLITE_OS_WINNT to 0. -*/ -#if SQLITE_OS_WIN && !defined(SQLITE_OS_WINNT) -# define SQLITE_OS_WINNT 1 -#endif - -/* -** Determine if we are dealing with WindowsCE - which has a much -** reduced API. -*/ -#if defined(_WIN32_WCE) -# define SQLITE_OS_WINCE 1 -#else -# define SQLITE_OS_WINCE 0 -#endif - -/* -** Determine if we are dealing with WinRT, which provides only a subset of -** the full Win32 API. -*/ -#if !defined(SQLITE_OS_WINRT) -# define SQLITE_OS_WINRT 0 -#endif - /* If the SET_FULLSYNC macro is not defined above, then make it ** a no-op */ diff --git a/src/os_win.c b/src/os_win.c index a2f5513a2b..343f0f01f0 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -15,16 +15,16 @@ #include "sqliteInt.h" #if SQLITE_OS_WIN /* This file is used for Windows only */ -#ifdef __CYGWIN__ -# include -# include /* amalgamator: keep */ -#endif - /* ** Include code that is common to all os_*.c files */ #include "os_common.h" +/* +** Include the header file for the Windows VFS. +*/ +#include "os_win.h" + /* ** Compiling and using WAL mode requires several APIs that are only ** available in Windows platforms based on the NT kernel. diff --git a/src/os_win.h b/src/os_win.h new file mode 100644 index 0000000000..15e53b1789 --- /dev/null +++ b/src/os_win.h @@ -0,0 +1,67 @@ +/* +** 2013 November 25 +** +** 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 contains code that is specific to Windows. +*/ +#ifndef _OS_WIN_H_ +#define _OS_WIN_H_ + +/* +** Include the Windows SDK header file. +*/ +#include "windows.h" + +#ifdef __CYGWIN__ +# include +# include /* amalgamator: keep */ +#endif + +/* +** Determine if we are dealing with Windows NT. +** +** We ought to be able to determine if we are compiling for win98 or winNT +** using the _WIN32_WINNT macro as follows: +** +** #if defined(_WIN32_WINNT) +** # define SQLITE_OS_WINNT 1 +** #else +** # define SQLITE_OS_WINNT 0 +** #endif +** +** However, vs2005 does not set _WIN32_WINNT by default, as it ought to, +** so the above test does not work. We'll just assume that everything is +** winNT unless the programmer explicitly says otherwise by setting +** SQLITE_OS_WINNT to 0. +*/ +#if SQLITE_OS_WIN && !defined(SQLITE_OS_WINNT) +# define SQLITE_OS_WINNT 1 +#endif + +/* +** Determine if we are dealing with WindowsCE - which has a much +** reduced API. +*/ +#if defined(_WIN32_WCE) +# define SQLITE_OS_WINCE 1 +#else +# define SQLITE_OS_WINCE 0 +#endif + +/* +** Determine if we are dealing with WinRT, which provides only a subset of +** the full Win32 API. +*/ +#if !defined(SQLITE_OS_WINRT) +# define SQLITE_OS_WINRT 0 +#endif + +#endif /* _OS_WIN_H_ */ diff --git a/tool/mksqlite3c-noext.tcl b/tool/mksqlite3c-noext.tcl index 017ad6292f..02d9ae5469 100644 --- a/tool/mksqlite3c-noext.tcl +++ b/tool/mksqlite3c-noext.tcl @@ -99,6 +99,7 @@ foreach hdr { mutex.h opcodes.h os_common.h + os_win.h os.h pager.h parse.h diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl index de9b48b97b..e565bcbfe3 100644 --- a/tool/mksqlite3c.tcl +++ b/tool/mksqlite3c.tcl @@ -103,6 +103,7 @@ foreach hdr { mutex.h opcodes.h os_common.h + os_win.h os.h pager.h parse.h diff --git a/tool/mksqlite3internalh.tcl b/tool/mksqlite3internalh.tcl index 406ef5c457..3938316eec 100644 --- a/tool/mksqlite3internalh.tcl +++ b/tool/mksqlite3internalh.tcl @@ -60,6 +60,7 @@ foreach hdr { keywordhash.h opcodes.h os_common.h + os_win.h os.h pager.h parse.h