Skip to content

Commit 6046d6b

Browse files
committed
Apply OSS consortium patch
1 parent 7532810 commit 6046d6b

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

libvbisam/isdelete.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ isdelcurr (const int ihandle)
186186
}
187187

188188
int
189-
isdelrec (const int ihandle, off_t trownumber)
189+
isdelrec (const int ihandle, vbisam_off_t trownumber)
190190
{
191191
struct DICTINFO *psvbptr;
192192
int iresult = 0;

libvbisam/ishelper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ isrelease (const int ihandle)
144144
}
145145

146146
int
147-
isrelrec (const int ihandle, const off_t trownumber)
147+
isrelrec (const int ihandle, const vbisam_off_t trownumber)
148148
{
149149
struct DICTINFO *psvbptr;
150150

@@ -192,7 +192,7 @@ isrename (char *pcoldname, char *pcnewname)
192192
}
193193

194194
int
195-
issetunique (const int ihandle, const off_t tuniqueid)
195+
issetunique (const int ihandle, const vbisam_off_t tuniqueid)
196196
{
197197
struct DICTINFO *psvbptr;
198198
off_t tvalue;
@@ -223,7 +223,7 @@ issetunique (const int ihandle, const off_t tuniqueid)
223223
}
224224

225225
int
226-
isuniqueid (const int ihandle, off_t *ptuniqueid)
226+
isuniqueid (const int ihandle, vbisam_off_t *ptuniqueid)
227227
{
228228
struct DICTINFO *psvbptr;
229229
off_t tvalue;

libvbisam/isrewrite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ isrewcurr (const int ihandle, char *pcrow)
295295
}
296296

297297
int
298-
isrewrec (const int ihandle, const off_t trownumber, char *pcrow)
298+
isrewrec (const int ihandle, const vbisam_off_t trownumber, char *pcrow)
299299
{
300300
struct DICTINFO *psvbptr;
301301
int ideleted, inewreclen, ioldreclen = 0, iresult = 0;

libvbisam/vblowlevel.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ ivblock (const int ihandle, const off_t toffset, const off_t tlength, const int
201201

202202
OVERLAPPED toverlapped;
203203
DWORD tflags = 0;
204+
DWORD winerrno = 0;
204205
int bunlock = 0;
205206

206207
if (!svbfile[ihandle].irefcount) {
@@ -248,6 +249,11 @@ ivblock (const int ihandle, const off_t toffset, const off_t tlength, const int
248249
(int)(tlength >> 32), &toverlapped)) {
249250
return 0;
250251
}
252+
winerrno = GetLastError();
253+
if (winerrno = ERROR_NOT_LOCKED){
254+
//ALREADY UNLOCKED **SAME FCNTL**
255+
return 0;
256+
}
251257
}
252258

253259
errno = EBADARG;

0 commit comments

Comments
 (0)