]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Make sure dot-lock is fully enabled when SQLITE_ENABLE_LOCKING_STYLE is
authordrh <drh@noemail.net>
Thu, 4 Dec 2008 12:34:15 +0000 (12:34 +0000)
committerdrh <drh@noemail.net>
Thu, 4 Dec 2008 12:34:15 +0000 (12:34 +0000)
disabled.  Fix compiler warnings when SQLITE_ENABLE_LOCKING_STYLE is
disabled. (CVS 5976)

FossilOrigin-Name: 4697249fcc6041ba7d2fb89589c855a8bec71eb2

manifest
manifest.uuid
src/os_unix.c
test/lock5.test

index 0725b3f4cdfa8021091d34e771f3d67916496d17..6572cbace85238e0ffb780ddd08c165714b8032f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\smemory\sleak\sin\sthe\sshell\sthat\soccurs\swhen\sa\s".import"\scommand\sfails.\nTicket\s#3517\s(CVS\s5975)
-D 2008-12-04T12:26:01
+C Make\ssure\sdot-lock\sis\sfully\senabled\swhen\sSQLITE_ENABLE_LOCKING_STYLE\sis\ndisabled.\s\sFix\scompiler\swarnings\swhen\sSQLITE_ENABLE_LOCKING_STYLE\sis\ndisabled.\s(CVS\s5976)
+D 2008-12-04T12:34:16
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 0aa7bbe3be6acc4045706e3bb3fd0b8f38f4a3b5
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -137,7 +137,7 @@ F src/os.c 0b411644b87ad689d7250bbfd1834d99b81a3df4
 F src/os.h ef8abeb9afc694b82dbd169a91c9b7e26db3c892
 F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
 F src/os_os2.c 36196e71292a44bf2d393413cd8c86199694b8b4
-F src/os_unix.c bc3e50bcc7d97c0ea2b75b20bc2b5b96ed677270
+F src/os_unix.c e625d228800b367b32c6ec888df34a06103f6e8c
 F src/os_win.c 3dff41670fb9798a869c636626bb7d6d8b6a45bb
 F src/pager.c a193da9e271898077de815819e4c29fc2b6ece2a
 F src/pager.h a02ef8e6cc7e78b54874166e5ce786c9d4c489bf
@@ -410,7 +410,7 @@ F test/lock.test a280c87f86cfe25ac8899bd6cdfd23ffc5aca40a
 F test/lock2.test 018b846f6f3b3b695fad07e317b7988442b556f4
 F test/lock3.test 8adfbf438b96316267611214d494ebc1311b8cda
 F test/lock4.test 09d97d52cae18fadfe631552af9880dac6b3ae90
-F test/lock5.test 175e2eb76e0d495c4cf2ffd4f07a62292b6c727f
+F test/lock5.test 6b1f78f09ad1522843dad571b76b321e6f439bf7
 F test/lock6.test f4e9052b14da3bd6807a757d5aed15c17321031a
 F test/lookaside.test e69f822f13745f1d5c445c6e30e30f059f30c8e5
 F test/main.test 187a9a1b5248ed74a83838c581c15ec6023b555b
@@ -662,7 +662,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 760333de65328281137e02423904f860df572391
-R f66c7f94e3ea522559fc1bed997ef2a1
+P cb9c15431c53b13b70d006d8c47741ebc1caaca3
+R 39955cff0967682033948df06f70c97f
 U drh
-Z b17108c3e3cf5baaa544d8a39f01bf78
+Z 033061a221ce993448c8fae205600a11
index 36a51e01745845d1b18927bfbfd0611a194b68c5..00d56e781b11c5d50e14444adeedd7fcf89e3bc1 100644 (file)
@@ -1 +1 @@
-cb9c15431c53b13b70d006d8c47741ebc1caaca3
\ No newline at end of file
+4697249fcc6041ba7d2fb89589c855a8bec71eb2
\ No newline at end of file
index 0f4bb71a842aa8af92c7d8ee8bbd53e89080172a..349725765c80f40175817dc214524088b7e29363 100644 (file)
@@ -43,7 +43,7 @@
 **   *  Definitions of sqlite3_vfs objects for all locking methods
 **      plus implementations of sqlite3_os_init() and sqlite3_os_end().
 **
-** $Id: os_unix.c,v 1.228 2008/12/03 22:48:33 drh Exp $
+** $Id: os_unix.c,v 1.229 2008/12/04 12:34:16 drh Exp $
 */
 #include "sqliteInt.h"
 #if SQLITE_OS_UNIX              /* This file is used on unix only */
@@ -2939,11 +2939,13 @@ static int unixFileSize(sqlite3_file *id, i64 *pSize){
   return SQLITE_OK;
 }
 
+#if SQLITE_ENABLE_LOCKING_MODE && defined(__DARWIN__)
 /*
 ** Handler for proxy-locking file-control verbs.  Defined below in the
 ** proxying locking division.
 */
 static int proxyFileControl(sqlite3_file*,int,void*);
+#endif
 
 
 /*
@@ -3285,7 +3287,6 @@ static int fillInUnixFile(
   }
 #endif
 
-#if SQLITE_ENABLE_LOCKING_STYLE
   else if( pLockingStyle == &dotlockIoMethods ){
     /* Dotfile locking uses the file path so it needs to be included in
     ** the dotlockLockingContext 
@@ -3301,7 +3302,6 @@ static int fillInUnixFile(
     }
     pNew->lockingContext = zLockFile;
   }
-#endif
 
 #if OS_VXWORKS
   else if( pLockingStyle == &semIoMethods ){
@@ -3437,12 +3437,14 @@ static int getTempname(int nBuf, char *zBuf){
   return SQLITE_OK;
 }
 
+#if SQLITE_ENABLE_LOCKING_MODE && defined(__DARWIN__)
 /*
 ** Routine to transform a unixFile into a proxy-locking unixFile.
 ** Implementation in the proxy-lock division, but used by unixOpen()
 ** if SQLITE_PREFER_PROXY_LOCKING is defined.
 */
 static int proxyTransformUnixFile(unixFile*, const char*);
+#endif
 
 
 /*
index bd20b8b76ed4f012b90a9c07b25917e7e660e660..63e7e6baafd276f5d1a4296f65e16b2dd3731f8b 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this script is database locks.
 #
-# $Id: lock5.test,v 1.5 2008/11/29 02:20:27 drh Exp $
+# $Id: lock5.test,v 1.6 2008/12/04 12:34:16 drh Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -101,6 +101,10 @@ do_test lock5-dotfile.X {
 #####################################################################
 
 file delete -force test.db
+if {[catch {sqlite3 db test.db -vfs unix-flock} msg]} {
+  finish_test
+  return
+}
 
 do_test lock5-flock.1 {
   sqlite3 db test.db -vfs unix-flock