]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add recognition of the SQLITE_OS_WINRT compile-time option.
authordrh <drh@noemail.net>
Thu, 1 Mar 2012 20:05:41 +0000 (20:05 +0000)
committerdrh <drh@noemail.net>
Thu, 1 Mar 2012 20:05:41 +0000 (20:05 +0000)
Use InitializeCriticalSectionEx() under winRT.

FossilOrigin-Name: 8b7ca8a09f7b69db1fe766616cba0307e681a6f3

Makefile.msc
manifest
manifest.uuid
src/mutex_w32.c
src/os.h

index e95b443fe10616593ac255e3e073f53897ca75f6..84efa4f58f97fccbf145f1f315bdeaee57a1112b 100644 (file)
@@ -47,7 +47,7 @@ BCC = cl.exe
 # will run on the target platform.  (BCC and TCC are usually the
 # same unless your are cross-compiling.)
 #
-TCC = cl.exe -W3 -DSQLITE_OS_WIN=1 -I. -I$(TOP)\src -fp:precise
+TCC = cl.exe -W3 -DSQLITE_OS_WIN=1 -DSQLITE_OS_WINRT=1 -I. -I$(TOP)\src -fp:precise
 
 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in 
 # any extension header files by default.  For non-amalgamation
index 598e97887678917bfb97a0b694c77027c66ed529..053f4b53914403184929ee7386e9501a4d16240d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Add\sback\sin\ssome\s#includes\sthat\swere\sremoved\sincorrectly\sby\sthe\nprevious\scheck-in.
-D 2012-03-01T19:14:13.642
+C Add\srecognition\sof\sthe\sSQLITE_OS_WINRT\scompile-time\soption.\s\s\nUse\sInitializeCriticalSectionEx()\sunder\swinRT.
+D 2012-03-01T20:05:41.277
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 3f79a373e57c3b92dabf76f40b065e719d31ac34
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
-F Makefile.msc 3a5582a858b8071af43cd459bd757f7d0748f66a
+F Makefile.msc 0e67f253439ebc333b7b49f373d5932a93209c6a
 F Makefile.vxworks 1deb39c8bb047296c30161ffa10c1b5423e632f9
 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
 F VERSION bb4c2a86abe53ea3c1d6ea515b69a426040e2414
@@ -160,10 +160,10 @@ F src/mutex.h 2a79e0c10c26412546b501ee0f3d92b42decf63e
 F src/mutex_noop.c 7682796b7d8d39bf1c138248858efcd10c9e1553
 F src/mutex_os2.c 882d735098c07c8c6a5472b8dd66e19675fe117f
 F src/mutex_unix.c c3a4e00f96ba068a8dbef34084465979aaf369cc
-F src/mutex_w32.c 5e54f3ba275bcb5d00248b8c23107df2e2f73e33
+F src/mutex_w32.c ddd2a783230e22831ab44fca181b5904e48a7318
 F src/notify.c 976dd0f6171d4588e89e874fcc765e92914b6d30
 F src/os.c e1acdc09ff3ac2412945cca9766e2dcf4675f31c
-F src/os.h a8c6a8aeda6c9a1b1deea675aa79bae82fa7c15f
+F src/os.h c3a9db9e8e16f564e1a40cea1687dad69634262c
 F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
 F src/os_os2.c 4a75888ba3dfc820ad5e8177025972d74d7f2440
 F src/os_unix.c 0e3d2942d228d0366fb80a3640f35caf413b66d1
@@ -991,7 +991,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
-P c0891296b49fb95917db8a881425f8131cbf6de7
-R 6e4cb882ea93ae9339007a493ca76cc2
+P 718905367ff3f86a449c2c27f724089ba31dea3a
+R 465a0789e63e9500d164032936751907
 U drh
-Z 1990475c2c72ee94b7f89b5294ac0476
+Z 36d2e47a7d135f112024e54b1ccd201a
index fa815bb210031135e9c95a778086f1c75a288c5b..4e41b5c0e4844de5ad16b5deeca8b5e89466e637 100644 (file)
@@ -1 +1 @@
-718905367ff3f86a449c2c27f724089ba31dea3a
\ No newline at end of file
+8b7ca8a09f7b69db1fe766616cba0307e681a6f3
\ No newline at end of file
index bfd9dacf6c2c4ff8da57c03600977194a0d9a595..901256be073d75c1018f58e7c5e4b64951505267 100644 (file)
@@ -114,7 +114,11 @@ static int winMutexInit(void){
   if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
     int i;
     for(i=0; i<ArraySize(winMutex_staticMutexes); i++){
+#if SQLITE_OS_WINRT
+      InitializeCriticalSectionEx(&winMutex_staticMutexes[i].mutex, 0, 0);
+#else
       InitializeCriticalSection(&winMutex_staticMutexes[i].mutex);
+#endif
     }
     winMutex_isInit = 1;
   }else{
index cf0530447e7b94d5f7b5985080b053618b415a46..1416b4672bdf4d000624a0f7ff4e4a7c35ce5b12 100644 (file)
--- a/src/os.h
+++ b/src/os.h
 # define SQLITE_OS_WINCE 0
 #endif
 
+/*
+** Determine if we are dealing with WindowsRT (Metro) as this has a different and
+** incompatible API from win32.
+*/
+#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
 */