diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-05-24 11:35:24 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-05-24 11:35:24 +0300 |
commit | 371bb85fe378ffd0ed6ddc81985d450cef5835a3 (patch) | |
tree | 6ab2d142b7aa1f9b29ec50b891c8293774964209 /src/systems.h | |
parent | f82d0b213fd2cdce80dc891906fba8d589115664 (diff) | |
download | gdbm-371bb85fe378ffd0ed6ddc81985d450cef5835a3.tar.gz gdbm-371bb85fe378ffd0ed6ddc81985d450cef5835a3.tar.bz2 |
More error checking; improve gdbm_recover
* Makefile.am (set-dist-date): New rule
(dist-hook): Catch FIXMEs in NEWS.
* NEWS: Updated.
* src/findkey.c (gdbm_bucket_element_valid_p): New function.
(_gdbm_read_entry): Validate the retrieved bucket element.
* src/gdbm.h.in (gdbm_recovery): New member: duplicate_keys.
(GDBM_BAD_HASH_TABLE): New error code.
* src/gdbmdefs.h (TYPE_WIDTH,SIGNED_TYPE_MAXIMUM)
(OFF_T_MAX): New defines.
(off_t_sum_ok): New function.
(gdbm_bucket_element_valid_p): New prototype.
* src/gdbmerrno.c: Support for GDBM_BAD_HASH_TABLE code.
* src/gdbmtool.c (recover_handler): Fix argument counting.
New argument 'summary' prints statistics summary at the end
of the run.
(export_handler,import_handler): Fix argument counting.
* src/mmap.c (SUM_FILE_SIZE): Rewrite as inlined function.
Add error checking.
(_gdbm_mapped_remap): More error checking.
* src/recover.c (run_recovery): Don't bail out on GDBM_CANNOT_REPLACE.
(gdbm_recover): Initialize duplicate_keys
* src/systems.h: Include limits.h
Diffstat (limited to 'src/systems.h')
-rw-r--r-- | src/systems.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systems.h b/src/systems.h index 66955dd..c678573 100644 --- a/src/systems.h +++ b/src/systems.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <unistd.h> | 33 | #include <unistd.h> |
34 | #include <fcntl.h> | 34 | #include <fcntl.h> |
35 | #include <errno.h> | 35 | #include <errno.h> |
36 | #include <limits.h> | ||
36 | 37 | ||
37 | #ifndef SEEK_SET | 38 | #ifndef SEEK_SET |
38 | # define SEEK_SET 0 | 39 | # define SEEK_SET 0 |