summaryrefslogtreecommitdiffstats
path: root/kexi/3rdparty/kexisql/src/os.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/3rdparty/kexisql/src/os.c')
-rw-r--r--kexi/3rdparty/kexisql/src/os.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/kexi/3rdparty/kexisql/src/os.c b/kexi/3rdparty/kexisql/src/os.c
index 16576924..fc0f91e2 100644
--- a/kexi/3rdparty/kexisql/src/os.c
+++ b/kexi/3rdparty/kexisql/src/os.c
@@ -172,7 +172,7 @@ static unsigned int elapse;
**
** If you close a file descriptor that points to a file that has locks,
** all locks on that file that are owned by the current process are
-** released. To work around this problem, each OsFile structure contains
+** released. To work around this problem, each OsFile structure tqcontains
** a pointer to an openCnt structure. There is one openCnt structure
** per open inode, which means that multiple OsFiles can point to a single
** openCnt. When an attempt is made to close an OsFile, if there are
@@ -531,11 +531,11 @@ int sqliteOsOpenReadWrite(
if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr )
return SQLITE_CANTOPEN;
FSGetDataForkName(&dfName);
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdWrShPerm, &(id->refNum)) != noErr ){
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdWrPerm, &(id->refNum)) != noErr ){
- if (FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if (FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdPerm, &(id->refNum)) != noErr )
return SQLITE_CANTOPEN;
else
@@ -650,7 +650,7 @@ int sqliteOsOpenExclusive(const char *zFilename, OsFile *id, int delFlag){
if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr )
return SQLITE_CANTOPEN;
FSGetDataForkName(&dfName);
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdWrPerm, &(id->refNum)) != noErr )
return SQLITE_CANTOPEN;
# else
@@ -724,7 +724,7 @@ int sqliteOsOpenReadOnly(const char *zFilename, OsFile *id){
if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr )
return SQLITE_CANTOPEN;
FSGetDataForkName(&dfName);
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdPerm, &(id->refNum)) != noErr )
return SQLITE_CANTOPEN;
# else
@@ -800,7 +800,7 @@ int sqliteOsTempFileName(char *zBuf){
};
static unsigned char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789";
int i, j;
struct stat buf;
@@ -827,7 +827,7 @@ int sqliteOsTempFileName(char *zBuf){
#if OS_WIN
static char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789";
int i, j;
const char *zDir;
@@ -854,7 +854,7 @@ int sqliteOsTempFileName(char *zBuf){
#if OS_MAC
static char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789";
int i, j;
char *zDir;
@@ -1398,20 +1398,20 @@ int sqliteOsReadLock(OsFile *id){
params.ioParam.ioRefNum = id->refNumRF;
params.ioParam.ioPosMode = fsFromStart;
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
while( cnt-->0 && (res = PBLockRangeSync(&params))!=noErr ){
UInt32 finalTicks;
Delay(1, &finalTicks); /* 1/60 sec */
}
if( res == noErr ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1;
- params.ioParam.ioReqCount = N_LOCKBYTE;
+ params.ioParam.ioRetqCount = N_LOCKBYTE;
PBUnlockRangeSync(&params);
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+lk;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
res = PBLockRangeSync(&params);
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
PBUnlockRangeSync(&params);
}
if( res == noErr ){
@@ -1504,24 +1504,24 @@ int sqliteOsWriteLock(OsFile *id){
params.ioParam.ioRefNum = id->refNumRF;
params.ioParam.ioPosMode = fsFromStart;
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
while( cnt-->0 && (res = PBLockRangeSync(&params))!=noErr ){
UInt32 finalTicks;
Delay(1, &finalTicks); /* 1/60 sec */
}
if( res == noErr ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE + id->locked;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
if( id->locked==0
|| PBUnlockRangeSync(&params)==noErr ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1;
- params.ioParam.ioReqCount = N_LOCKBYTE;
+ params.ioParam.ioRetqCount = N_LOCKBYTE;
res = PBLockRangeSync(&params);
}else{
res = afpRangeNotLocked;
}
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
PBUnlockRangeSync(&params);
}
if( res == noErr ){
@@ -1611,13 +1611,13 @@ int sqliteOsUnlock(OsFile *id){
rc = SQLITE_OK;
}else if( id->locked<0 ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1;
- params.ioParam.ioReqCount = N_LOCKBYTE;
+ params.ioParam.ioRetqCount = N_LOCKBYTE;
PBUnlockRangeSync(&params);
rc = SQLITE_OK;
id->locked = 0;
}else{
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+id->locked;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
PBUnlockRangeSync(&params);
rc = SQLITE_OK;
id->locked = 0;