diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/os_unix.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index cfdd5a0ae..3d25b306b 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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. */ |