]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Initial work on isolating usage of the Windows header file.
authormistachkin <mistachkin@noemail.net>
Mon, 25 Nov 2013 09:36:07 +0000 (09:36 +0000)
committermistachkin <mistachkin@noemail.net>
Mon, 25 Nov 2013 09:36:07 +0000 (09:36 +0000)
FossilOrigin-Name: 0d42c6b830ee50f45539d73e3948ed3bc50a11d1

13 files changed:
Makefile.in
Makefile.msc
Makefile.vxworks
main.mk
manifest
manifest.uuid
src/mutex_w32.c
src/os.h
src/os_win.c
src/os_win.h [new file with mode: 0644]
tool/mksqlite3c-noext.tcl
tool/mksqlite3c.tcl
tool/mksqlite3internalh.tcl

index a0217c43431a6154fe978523686ae8a3070c8242..d96d30ae863d0945ac999d96e34b061c795816df 100644 (file)
@@ -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  \
index 437cb0eac3419da8e2d33194a4e09fcb4aec463f..afe66baad8efdf34415f9535227b58add28501dc 100644 (file)
@@ -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 \
index c9058da3e52390668526be9217dcd8fa65295116..70b9bdde6b46ec298fc20314722798c8f488a5a2 100644 (file)
@@ -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 41d1743832cbc9251cfd02425f912450067a6764..4992de549b0956ca5ac4e052190d7d4cc2f1fec5 100644 (file)
--- 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  \
index aa2b98cdb9dbbcea930fb1b72d4ba90f8d8243c8..41499ad4d092d69e387b3c25d7f89f0cd54bf602 100644 (file)
--- 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
index 7967f97b83844b27753b2883867579a4ca03f53a..586356026fd2ce02013667ba4b26cded4283cebc 100644 (file)
@@ -1 +1 @@
-8f3c767a30c552548ead104ca125f182ce4849ad
\ No newline at end of file
+0d42c6b830ee50f45539d73e3948ed3bc50a11d1
\ No newline at end of file
index 4b88c174524ede16b42ff42e7e3bc4a317d6762b..2eb852413e89a02959537cbc5582369fc84707a3 100644 (file)
 */
 #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.
 */
index 070a2ddd17f771f98ff8ccd6f033bdacc5e9f60c..1d438d22cdc0a33a8a48f0f0ffc7a73a9b64905b 100644 (file)
--- a/src/os.h
+++ b/src/os.h
 # endif
 #endif
 
-#if SQLITE_OS_WIN
-# include <windows.h>
-#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
 */
index a2f5513a2beb31d95a82e116e807ddde1910e850..343f0f01f0190d52379bd3dbfaadd53effd087c9 100644 (file)
 #include "sqliteInt.h"
 #if SQLITE_OS_WIN               /* This file is used for Windows only */
 
-#ifdef __CYGWIN__
-# include <sys/cygwin.h>
-# include <errno.h> /* 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 (file)
index 0000000..15e53b1
--- /dev/null
@@ -0,0 +1,67 @@
+/*\r
+** 2013 November 25\r
+**\r
+** The author disclaims copyright to this source code.  In place of\r
+** a legal notice, here is a blessing:\r
+**\r
+**    May you do good and not evil.\r
+**    May you find forgiveness for yourself and forgive others.\r
+**    May you share freely, never taking more than you give.\r
+**\r
+******************************************************************************\r
+**\r
+** This file contains code that is specific to Windows.\r
+*/\r
+#ifndef _OS_WIN_H_\r
+#define _OS_WIN_H_\r
+\r
+/*\r
+** Include the Windows SDK header file.\r
+*/\r
+#include "windows.h"\r
+\r
+#ifdef __CYGWIN__\r
+# include <sys/cygwin.h>\r
+# include <errno.h> /* amalgamator: keep */\r
+#endif\r
+\r
+/*\r
+** Determine if we are dealing with Windows NT.\r
+**\r
+** We ought to be able to determine if we are compiling for win98 or winNT\r
+** using the _WIN32_WINNT macro as follows:\r
+**\r
+** #if defined(_WIN32_WINNT)\r
+** # define SQLITE_OS_WINNT 1\r
+** #else\r
+** # define SQLITE_OS_WINNT 0\r
+** #endif\r
+**\r
+** However, vs2005 does not set _WIN32_WINNT by default, as it ought to,\r
+** so the above test does not work.  We'll just assume that everything is\r
+** winNT unless the programmer explicitly says otherwise by setting\r
+** SQLITE_OS_WINNT to 0.\r
+*/\r
+#if SQLITE_OS_WIN && !defined(SQLITE_OS_WINNT)\r
+# define SQLITE_OS_WINNT 1\r
+#endif\r
+\r
+/*\r
+** Determine if we are dealing with WindowsCE - which has a much\r
+** reduced API.\r
+*/\r
+#if defined(_WIN32_WCE)\r
+# define SQLITE_OS_WINCE 1\r
+#else\r
+# define SQLITE_OS_WINCE 0\r
+#endif\r
+\r
+/*\r
+** Determine if we are dealing with WinRT, which provides only a subset of\r
+** the full Win32 API.\r
+*/\r
+#if !defined(SQLITE_OS_WINRT)\r
+# define SQLITE_OS_WINRT 0\r
+#endif\r
+\r
+#endif /* _OS_WIN_H_ */\r
index 017ad6292fc95fdd1f8ef7da31540f89dc6297c4..02d9ae546995b4917715457e64bd42d206c33a9d 100644 (file)
@@ -99,6 +99,7 @@ foreach hdr {
    mutex.h
    opcodes.h
    os_common.h
+   os_win.h
    os.h
    pager.h
    parse.h
index de9b48b97b697330dff1daa3b1730d0144f9acc9..e565bcbfe3b265a1553feafab210b429c5c3cf73 100644 (file)
@@ -103,6 +103,7 @@ foreach hdr {
    mutex.h
    opcodes.h
    os_common.h
+   os_win.h
    os.h
    pager.h
    parse.h
index 406ef5c45751eb3030ff9f9696bd9f1e78e53315..3938316eec154c4fa9f07af6f30231cd654a3631 100644 (file)
@@ -60,6 +60,7 @@ foreach hdr {
    keywordhash.h
    opcodes.h
    os_common.h
+   os_win.h
    os.h
    pager.h
    parse.h