Fixes to the proxy locking so that os_unix.c compiles on linux with proxy

locking omitted. (CVS 5935)

FossilOrigin-Name: 6f910b7036817f4bb4de807bf48938d20ab033cc
This commit is contained in:
drh 2008-11-21 00:24:42 +00:00
parent aebf413d9a
commit 41022645ee
3 changed files with 24 additions and 20 deletions

View File

@ -1,5 +1,5 @@
C Added\ssupport\sfor\sproxy\sfile\slocking\sstyle\nAdded\spragma\ssupport\sfor\scontrolling\sproxy\sfile\slocking\nAdded\sfile\scontrol\saccess\sto\slast\serrno\sand\sproxy\slocking\nAdded\ssupport\sfor\sTMPDIR\senvironment\svariable\nExtended\sunit\stests\sto\scover\snew\sproxy\slocking\spragmas\sand\sfile\scontrol\sfeatures\s(CVS\s5934)
D 2008-11-21T00:10:35
C Fixes\sto\sthe\sproxy\slocking\sso\sthat\sos_unix.c\scompiles\son\slinux\swith\sproxy\nlocking\somitted.\s(CVS\s5935)
D 2008-11-21T00:24:42
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 d12285d66df674c42f6f544a6f7c21bf1a954ee1
F src/os_unix.c bdb0b66407141b7cd3520e92c685ea097b191c0e
F src/os_unix.c 28cc4da7886c265c0a58f6975346b83180f03e5b
F src/os_win.c 3dff41670fb9798a869c636626bb7d6d8b6a45bb
F src/pager.c db12a8333e54e7bbf62dc621ada5507adb3a6493
F src/pager.h a02ef8e6cc7e78b54874166e5ce786c9d4c489bf
@ -660,7 +660,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P eebacbc9d7d0625dfbe6367046fa4a0ca9c04e74
R 91b324303811443cc8a01d95fd1a412a
U aswift
Z 225056935d0aa6350680303c08feb50b
P b9bc36d3d5e35821ef69c0881a84c0afed253c9e
R 51d99d1efef810ac91db46cd7349fd5c
U drh
Z 0b65fc7ed0458f20fc913219cf654811

View File

@ -1 +1 @@
b9bc36d3d5e35821ef69c0881a84c0afed253c9e
6f910b7036817f4bb4de807bf48938d20ab033cc

View File

@ -12,7 +12,7 @@
**
** This file contains code that is specific to Unix systems.
**
** $Id: os_unix.c,v 1.217 2008/11/21 00:10:35 aswift Exp $
** $Id: os_unix.c,v 1.218 2008/11/21 00:24:42 drh Exp $
*/
#include "sqliteInt.h"
#if SQLITE_OS_UNIX /* This file is used on unix only */
@ -403,6 +403,12 @@ struct openCnt {
static struct lockInfo *lockList = 0;
static struct openCnt *openList = 0;
#ifdef SQLITE_TEST
/* simulate multiple hosts by creating unique hostid file paths */
int sqlite3_hostid_num = 0;
#endif
#if IS_VXWORKS
/*
** This hash table is used to bind the canonical file name to a
@ -1107,7 +1113,7 @@ static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
newOffset = lseek(id->h, offset, SEEK_SET);
SimulateIOError( newOffset-- );
if( newOffset!=offset ){
if( newOffet == -1 ){
if( newOffset == -1 ){
((unixFile*)id)->lastErrno = errno;
}else{
((unixFile*)id)->lastErrno = 0;
@ -1169,7 +1175,7 @@ static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){
#else
newOffset = lseek(id->h, offset, SEEK_SET);
if( newOffset!=offset ){
if( newOffet == -1 ){
if( newOffset == -1 ){
((unixFile*)id)->lastErrno = errno;
}else{
((unixFile*)id)->lastErrno = 0;
@ -2903,11 +2909,6 @@ static int genHostID(char *pHostID){
return SQLITE_OK;
}
#ifdef SQLITE_TEST
/* simulate multiple hosts by creating unique hostid file paths */
int sqlite3_hostid_num = 0;
#endif
/* writes the host id path to path, path should be an pre-allocated buffer
** with enough space for a path */
static int getHostIDPath(char *path, size_t len){
@ -3412,7 +3413,7 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
*(const char **)pArg = NULL;
}
#else
*(void*)pArg = NULL;
*(void**)pArg = NULL;
#endif
return SQLITE_OK;
}
@ -3791,7 +3792,7 @@ static int getTempname(int nBuf, char *zBuf){
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"0123456789";
int i, j;
unsigned int i, j;
struct stat buf;
const char *zDir = ".";
@ -3951,9 +3952,12 @@ static int unixOpen(
#else
unlink(zName);
#endif
}else{
((unixFile *)pFile)->oflags = oflags;
}
#if SQLITE_ENABLE_LOCKING_STYLE
else{
((unixFile*)pFile)->oflags = oflags;
}
#endif
if( pOutFlags ){
*pOutFlags = flags;
}