aboutsummaryrefslogtreecommitdiff
path: root/src/gdbmsetopt.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-05-30 14:04:48 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-05-30 14:04:48 +0300
commit4e819c987988432ef936c6c3e003db6b26463154 (patch)
treefeefee7688cec0df1a66401b9da2204272d8d83f /src/gdbmsetopt.c
parentb8d5da4c426b21ca0e56fc1cd6f75b49c0668e95 (diff)
downloadgdbm-4e819c987988432ef936c6c3e003db6b26463154.tar.gz
gdbm-4e819c987988432ef936c6c3e003db6b26463154.tar.bz2
Fix the legacy operation (--disable-mmapped-io)
* src/mmap.c (_gdbm_file_extend): Move to ... * src/fullio.c: ... here * src/proto.h (_gdbm_file_extend): New proto. * src/gdbmopen.c (gdbm_fd_open): Make sure the file size equals header->next_block. * src/gdbmsetopt.c [!HAVE_MMAP]: Don't disable GDBM_GETFLAGS. * src/update.c (_gdbm_end_update): Make sure disk file ends on header->next_block.
Diffstat (limited to 'src/gdbmsetopt.c')
-rw-r--r--src/gdbmsetopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gdbmsetopt.c b/src/gdbmsetopt.c
index 69e244c..f9face0 100644
--- a/src/gdbmsetopt.c
+++ b/src/gdbmsetopt.c
@@ -248,6 +248,7 @@ setopt_gdbm_getmaxmapsize (GDBM_FILE dbf, void *optval, int optlen)
*(size_t*) optval = dbf->mapped_size_max;
return 0;
}
+#endif
static int
setopt_gdbm_getflags (GDBM_FILE dbf, void *optval, int optlen)
@@ -270,7 +271,6 @@ setopt_gdbm_getflags (GDBM_FILE dbf, void *optval, int optlen)
}
return 0;
}
-#endif
static int
setopt_gdbm_getdbname (GDBM_FILE dbf, void *optval, int optlen)
@@ -323,8 +323,8 @@ static setopt_handler setopt_handler_tab[] = {
[GDBM_GETMMAP] = setopt_gdbm_getmmap,
[GDBM_SETMAXMAPSIZE] = setopt_gdbm_setmaxmapsize,
[GDBM_GETMAXMAPSIZE] = setopt_gdbm_getmaxmapsize,
- [GDBM_GETFLAGS] = setopt_gdbm_getflags,
#endif
+ [GDBM_GETFLAGS] = setopt_gdbm_getflags,
[GDBM_GETDBNAME] = setopt_gdbm_getdbname,
[GDBM_GETBLOCKSIZE] = setopt_gdbm_getblocksize,
};

Return to:

Send suggestions and report system problems to the System administrator.