2006-10-13 12:11:30 +00:00
|
|
|
diff -rc db-4.5.20-orig/os/os_flock.c db-4.5.20/os/os_flock.c
|
|
|
|
*** db-4.5.20-orig/os/os_flock.c 2006-10-13 12:36:12.000000000 +0200
|
|
|
|
--- db-4.5.20/os/os_flock.c 2006-10-13 12:40:11.000000000 +0200
|
2006-06-07 15:27:17 +00:00
|
|
|
***************
|
2006-10-13 12:11:30 +00:00
|
|
|
*** 30,35 ****
|
|
|
|
--- 30,44 ----
|
2006-06-07 15:27:17 +00:00
|
|
|
|
2006-10-13 12:11:30 +00:00
|
|
|
DB_ASSERT(dbenv, F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1);
|
2006-06-07 15:27:17 +00:00
|
|
|
|
|
|
|
+ #ifdef __CYGWIN__
|
|
|
|
+ /*
|
|
|
|
+ * Windows file locking interferes with read/write operations, so we
|
|
|
|
+ * map the ranges to an area past the end of the file.
|
|
|
|
+ */
|
2006-11-07 14:51:28 +00:00
|
|
|
+ DB_ASSERT(dbenv, offset < (off_t) 1 << 62);
|
2006-06-07 15:27:17 +00:00
|
|
|
+ offset += (off_t) 1 << 62;
|
|
|
|
+ #endif
|
|
|
|
+
|
|
|
|
fl.l_start = offset;
|
|
|
|
fl.l_len = 1;
|
2006-10-13 12:11:30 +00:00
|
|
|
fl.l_type = acquire ? F_WRLCK : F_UNLCK;
|
|
|
|
Only in db-4.5.20/os: os_flock.c~
|