aboutsummaryrefslogtreecommitdiff
path: root/src/gdbm.h.in
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-07-28 12:20:25 +0300
committerSergey Poznyakoff <gray@gnu.org>2021-07-28 12:20:25 +0300
commit016aaadca5bf994678a56399c63ae0ac28adfc48 (patch)
tree65c56e596be76cfb35fc7c1d4273a52daea4f56d /src/gdbm.h.in
parent35e81092b99608d8a4f1ecf55c21bbd4d3c5eda0 (diff)
downloadgdbm-016aaadca5bf994678a56399c63ae0ac28adfc48.tar.gz
gdbm-016aaadca5bf994678a56399c63ae0ac28adfc48.tar.bz2
Introduce extended header.
* src/gdbm.h.in (GDBM_NUMSYNC): New flag for gdbm_open * src/gdbmdefs.h (gdbm_ext_header): New struct. (gdbm_file_header): New member of the union v: gdbm_ext_header. * src/gdbmopen.c (gdbm_header_avail): New function. (validate_header): Use dbf->avail. (gdbm_fd_open): Read both database types. Create GDBM_NUMSYNC_MAGIC database if given the GDBM_MAGIC flag.
Diffstat (limited to 'src/gdbm.h.in')
-rw-r--r--src/gdbm.h.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gdbm.h.in b/src/gdbm.h.in
index 1bff4a7..f6a457a 100644
--- a/src/gdbm.h.in
+++ b/src/gdbm.h.in
@@ -56,7 +56,9 @@ extern "C" {
# define GDBM_CLOERROR 0x0400 /* Only for gdbm_fd_open: close fd on error. */
# define GDBM_XVERIFY 0x0800 /* Additional consistency checks. */
# define GDBM_PREREAD 0x1000 /* Enable pre-fault reading of mmapped regions. */
+# define GDBM_NUMSYNC 0x2000
+
/* Parameters to gdbm_store for simple insertion or replacement in the
case that the key is already in the database. */
# define GDBM_INSERT 0 /* Never replace old data with new. */

Return to:

Send suggestions and report system problems to the System administrator.