1 *** PORT/db/recno/rec_open.c.orig 1993/10/13 02:01:31
2 --- PORT/db/recno/rec_open.c 1993/10/13 02:20:47
8 t->bt_msize = sb.st_size;
12 + * The Linux kernel mmap() semantics are broken :
14 + * Under Linux, read only private mappings cause write only and read/write
15 + * opens to fail with errno=ETXTBSY. Shared read only mappings should work
16 + * fine though, but I'm not familiar enough with the code to ascertain that
17 + * a MAP_SHARED mapping would be safe so I use the non-mmap'd version
23 if ((t->bt_smap = mmap(NULL, t->bt_msize,
24 PROT_READ, MAP_PRIVATE, rfd,
25 (off_t)0)) == (caddr_t)-1)
28 t->bt_cmap = t->bt_smap;
29 t->bt_emap = t->bt_smap + sb.st_size;