mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Make os_unix compile with SQLITE_ENABLE_PROXY_LOCKING (CVS 5970)
FossilOrigin-Name: 3efedac6aa4f544d40c2f782109d4e1795e449a0
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
||||
C Continue\swith\sthe\scleanup\sof\sos_unix.c.\s(CVS\s5969)
|
||||
D 2008-12-03T19:34:47
|
||||
C Make\sos_unix\scompile\swith\sSQLITE_ENABLE_PROXY_LOCKING\s(CVS\s5970)
|
||||
D 2008-12-03T21:26:20
|
||||
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 0c5fa756d8f8d0a911798fe9a055d48288837054
|
||||
F src/os_unix.c 199a3f3af7e0ba4562a4986282f89a1fa0bf15cc
|
||||
F src/os_win.c 3dff41670fb9798a869c636626bb7d6d8b6a45bb
|
||||
F src/pager.c a193da9e271898077de815819e4c29fc2b6ece2a
|
||||
F src/pager.h a02ef8e6cc7e78b54874166e5ce786c9d4c489bf
|
||||
@@ -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 2822cbb960dbef9d30586ee112d74f9f566309fa
|
||||
R d0794ff46f45a69ece79ca8f8fe78969
|
||||
U drh
|
||||
Z 8146de7c1ac4bbf4290ba300faea7b50
|
||||
P 215d36ea89078036fb66b5154f054613b735dab3
|
||||
R 80492df3979d1c7b94e5fa0d18310166
|
||||
U aswift
|
||||
Z d7e30b90b8fb23d4e09e4a51a9d3bb3d
|
||||
|
||||
@@ -1 +1 @@
|
||||
215d36ea89078036fb66b5154f054613b735dab3
|
||||
3efedac6aa4f544d40c2f782109d4e1795e449a0
|
||||
@@ -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.225 2008/12/03 19:34:47 drh Exp $
|
||||
** $Id: os_unix.c,v 1.226 2008/12/03 21:26:20 aswift Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#if SQLITE_OS_UNIX /* This file is used on unix only */
|
||||
@@ -2970,7 +2970,19 @@ end_create_proxy:
|
||||
sqlite3_free(pNew);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static const sqlite3_io_methods afpIoMethods;
|
||||
static int unixWrite(
|
||||
sqlite3_file *id,
|
||||
const void *pBuf,
|
||||
int amt,
|
||||
sqlite3_int64 offset
|
||||
);
|
||||
static int unixRead(
|
||||
sqlite3_file *id,
|
||||
void *pBuf,
|
||||
int amt,
|
||||
sqlite3_int64 offset
|
||||
);
|
||||
/* takes the conch by taking a shared lock and read the contents conch, if
|
||||
** lockPath is non-NULL, the host ID and lock file path must match. A NULL
|
||||
** lockPath means that the lockPath in the conch file will be used if the
|
||||
@@ -3225,6 +3237,7 @@ static int switchLockProxyPath(unixFile *pFile, const char *path) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
static const sqlite3_io_methods dotlockIoMethods;
|
||||
/*
|
||||
** pFile is a file that has been opened by a prior xOpen call. dbPath
|
||||
** is a string buffer at least MAXPATHLEN+1 characters in size.
|
||||
@@ -3238,7 +3251,7 @@ static int proxyGetDbPathForUnixFile(unixFile *pFile, char *dbPath){
|
||||
/* afp style keeps a reference to the db path in the filePath field
|
||||
** of the struct */
|
||||
assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
|
||||
strcpy(dbPath, ((afpLockingContext *)pFile->lockingContext)->dbPath)
|
||||
strcpy(dbPath, ((afpLockingContext *)pFile->lockingContext)->dbPath);
|
||||
}else
|
||||
#endif
|
||||
if( pFile->pMethod == &dotlockIoMethods ){
|
||||
@@ -3253,7 +3266,7 @@ static int proxyGetDbPathForUnixFile(unixFile *pFile, char *dbPath){
|
||||
}
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
static const sqlite3_io_methods proxyIoMethods;
|
||||
/*
|
||||
** Takes an already filled in unix file and alters it so all file locking
|
||||
** will be performed on the local proxy lock file. The following fields
|
||||
@@ -4172,7 +4185,7 @@ static int fillInUnixFile(
|
||||
}
|
||||
|
||||
#if SQLITE_ENABLE_LOCKING_STYLE && defined(__DARWIN__)
|
||||
else if( pLockingStyle == &apfIoMethods ){
|
||||
else if( pLockingStyle == &afpIoMethods ){
|
||||
/* AFP locking uses the file path so it needs to be included in
|
||||
** the afpLockingContext.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user