path: root/configure.ac
diff options
authorSergey Poznyakoff <gray@gnu.org>2016-07-19 12:01:48 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-07-19 12:58:16 +0300
commit85f1e72da83e3078e2ae1f78093ef0966e43cec1 (patch)
treeb00707979e9088d5f7b7880d438260eb063c9160 /configure.ac
parent8e83f209342e2b035bbb19efa87ec5295158ef65 (diff)
Implement gdbm_recover function
* configure.ac: Don't check for rename. * src/Makefile.am (libgdbm_la_SOURCES): Add recover.c * src/recover.c: New file. * src/bucket.c (_gdbm_get_bucket): Remove extra space before [ * src/err.c (prerror): Take additional argument (gdbm_perror): Print system errno if necessary. * src/gdbm.h.in (GDBM_CLOERROR): New flag. (gdbm_fd_open, gdbm_copy_meta): New proto. (gdbm_last_syserr,gdbm_db_strerror,gdbm_recover): New proto. (gdbm_syserr): New extern. (gdbm_recovery): New struct. (GDBM_RCVR_DEFAULT,GDBM_RCVR_ERRFUN) (GDBM_RCVR_MAX_FAILED_KEYS) (GDBM_RCVR_MAX_FAILED_BUCKETS) (GDBM_RCVR_MAX_FAILURES) (GDBM_RCVR_BACKUP): New flags. (GDBM_BACKUP_FAILED): New error code. * src/gdbmclose.c (gdbm_close): Work correctly if dbf->desc == -1. * src/gdbmcount.c (gdbm_count): Remove spurious sorting. Use _gdbm_next_bucket_dir for iterating over the buckets. * src/gdbmdefs.h (struct gdbm_file_info)<last_syserror> <last_errstr>: New members. * src/gdbmerrno.c (gdbm_set_errno): Set last_syserror as well. (gdbm_clear_error): Reset last_syserror. (gdbm_last_syserr): New function. (gdbm_errlist): New entry for GDBM_BACKUP_FAILED. (gdbm_db_strerror): New function. (gdbm_syserr): New global. * src/gdbmload.c (get_parms): Buffer can be NULL. * src/gdbmopen.c (gdbm_fd_open): New function. (gdbm_open): Rewrite as a wrapper over gdbm_fd_open. * src/gdbmreorg.c (gdbm_reorganize): Rewrite as a wrapper over gdbm_recover. * src/proto.h (_gdbm_next_bucket_dir): New proto. * src/gdbmtool.c: New command: recover. * tests/.gitignore: Add gtrecover * tests/gtrecover.c: New test program. * tests/Makefile.am: Build gtrecover
Diffstat (limited to 'configure.ac')
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 336e05c..1424ea0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,7 +107,7 @@ AC_CHECK_HEADERS([sys/file.h sys/termios.h string.h locale.h getopt.h])
AC_CHECK_LIB(dbm, main)
AC_CHECK_LIB(ndbm, main)
-AC_CHECK_FUNCS([rename ftruncate flock lockf fsync setlocale getopt_long])
+AC_CHECK_FUNCS([ftruncate flock lockf fsync setlocale getopt_long])
if test x$mapped_io = xyes

Return to:

Send suggestions and report system problems to the System administrator.