Age | Commit message (Collapse) | Author | Files |
|
|
|
|
|
In particular, this addresses https://puszcza.gnu.org.ua/bugs/?566
* configure.ac: Fix diagnostic message
* tools/gdbmshell.c: Use lerror when needed.
(recover_handler): Accept varargs
(command_tab): Use argdoc to provide help for varargs
(help_handler): Handle argdoc
* tools/gdbmtool.h (PARAM_LOCPTR): New macro.
* tools/gram.y: Accept a single unadorned key=value pair as argument.
Fix locus for key=value pair in a list.
* tools/lex.l (YY_USER_ACTION): Use setbeg() to decide whether yyloc.beg
must be updated.
(setbeg): New function.
|
|
* configure.ac: Check if getline is available.
* tools/gdbmshell.c (argsprep): Use getline.
[!HAVE_GETLINE] (getline): Simple replacement.
|
|
|
|
|
|
Sources for the libgdbm library reside in src/.
Sources for building accompanying tools are moved to the tools/
subdirectory.
|
|
* configure.ac: Don't use $YACC and $LEX (undefined since f4c143fbdf).
* src/gdbmshell.c (run_command): Free arglist if not saved to last_args.
* src/gdbmtool.c (gdbmtool_init): Correctly report unrecognized long
options.
* src/gdbmtool.h (YY_LOCATION_PRINT): Define to locus_print.
(locus_print): New proto.
* src/gram.y: Define destructors for various symbols.
* src/lex.l: Save source file names in a linked list. Don't free
source name in input_context_pop, because yypush might refer to it
via yyloc stack even after readinf eof (e.g. when printing location).
The collected list is freed at program exit.
(locus_print): New function.
* src/parseopt.c (parseopt_free): New function.
(parseopt_first): Call parseopt_free.
(parseopt_next): Call parseopt_free, depending on the result.
* src/var.c (variable) <freehook>: New member.
(errormask_freehook): New function. Set it as freehook for errorexit
and errormask.
(variables_free): Call freehook, if defined.
|
|
|
|
|
|
|
|
|
|
That should fix https://puszcza.gnu.org.ua/support/?349
* configure.ac: Don't use obsolete macros.
Use AM_GNU_GETTEXT_REQUIRE_VERSION (and require gettext 0.19),
if available. Install a kludge for that to work on autoconf 2.69.
Don't check for libdbm and libnbml.
|
|
DejaGNU starting from version 1.6.3 looks for the testsuite in the
directory testsuite.
See https://puszcza.gnu.org.ua/bugs/index.php?519
* configure.ac: Register tests/gdbmtool/Makefile
* tests/Makefile.am: Move dejagnu tests to the gdbmtool subdir.
* tests/gdbmtool/Makefile.am: New file.
* tests/config/default.exp: Move to tests/gdbmtool/config/default.exp
* tests/gdbmtool/base.exp: Move to tests/gdbmtool/testsuite/gdbmtool/base.exp
|
|
* configure.ac: Check for st_mtim and st_mtimespec in struct stat.
The former is POSIX, the latter is used instead of it on some systems
(reportedly, Darwin and NetBSD).
* src/systems.h [!HAVE_STRUCT_STAT_ST_MTIM]: Use st_mtimespec if
available.
* src/gdbmshell.c (print_snapshot): Fall back to st_mtime if nanosecond
precision is not available.
* src/gdbmsync.c (timespec_cmp): Take two pointers to struct stat as
arguments. Use the right time field, depending on the configuration
settings. All uses changed.
|
|
This requires autoconf 2.70. Reverted until it is spread wide enough.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* src/gdbmconst.h: Don't redefine SIZE_T_MAX
* src/gdbmtool.c: Likewise.
Include <termios.h>, instead of <sys/termios.h>
* configure.ac: Don't check for termios.h
* tests/closerr.c: Minor fixes.
|
|
|
|
|
|
|
|
|
|
* src/gdbm.h.in (gdbm_close, gdbm_sync): Return int
(GDBM_FILE_CLOSE_ERROR, GDBM_FILE_SYNC_ERROR): New error codes.
* src/gdbmclose.c (gdbm_close): Return 0 on success, -1 on failure.
Set gdbm_errno and errno.
* src/gdbmsync.c (gdbm_sync): Likewise.
* src/gdbmerrno.c: Handle new error codes.
* src/mmap.c (_gdbm_mapped_sync): Set gdbm_errno.
* src/proto.h (gdbm_file_sync): Set gdbm_errno.
* doc/gdbm.3: Document changes.
* doc/gdbm.texi: Document changes.
* NEWS: Document changes.
* configure.ac: Set patchlevel.
* tests/Makefile.am: Add new test.
* tests/testsuite.at: Add new test.
* tests/closerr.at: New test case.
* tests/closerr.c: New test program.
* tests/gtdel.c: Check gdbm_close return.
* tests/gtdump.c: Likewise.
* tests/gtfetch.c: Likewise.
* tests/gtload.c: Likewise.
* tests/gtopt.c: Likewise.
* tests/gtrecover.c: Likewise.
|
|
|
|
* configure.ac: Version 1.5
* NEWS: Update.
* src/Makefile.am (VI_CURRENT): Increment to 6
* src/bucket.c (_gdbm_get_bucket): Fix the upper limit for
bucket_bits.
* src/falloc.c (push_avail_block): Fill the allocated block
with 0s.
|
|
|
|
* src/input-std.c: Bugfix
* doc/gdbm.texi: Document changes.
* README: Update.
* configure.ac: New option --enable-gdbmtool-debug.
* src/Makefile.am: Conditionally augment AM_YFLAGS and
AM_LFLAGS with options that enable debugging.
* src/gdbmtool.c: Conditionally enable --lex-trace and
--gram-trace options.
* src/gram.y: Likewise.
* src/lex.l: Likewise.
* tests/Makefile.am: Remove architecure-dependent tests.
* tests/testsuite.at: Likewise.
|
|
* configure.ac: Remove gdbm-1.8.3 compatibility layer.
Version 1.14.90
* Makefile.am (ACLOCAL_AMFLAGS): Remove deprecated variable.
(MAYBE_EXPORT): Remove variable and conditional.
* NEWS: Update.
* NOTE-WARNING: Update.
* README: Update.
* doc/gdbm.texi: Update.
* export/.gitignore: Remove.
* export/Makefile.am: Remove.
* export/export.c: Remove.
|
|
* src/gdbm_dump.c: Fix exit code.
* configure.ac: Determine presence of gzip and base64
(GZIP_BIN,BASE64_BIN): New variables.
* tests/atlocal.in (GZIP_BIN,BASE64_BIN): New variables.
* tests/dump00.at: New file.
* tests/dump01.at: New file.
* tests/dump02.at: New file.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Add new tests.
|
|
|
|
|
|
|
|
* configure.ac: Check whether __thread qualifier is supported
* src/gdbmerrno.c (gdbm_errno_storage): Use GDBM_THREAD_LOCAL instead
of __thread.
|
|
|
|
|
|
* configure.ac: Fix description wording.
* src/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Don't
define GDBM_DEBUG_ENABLE.
* tests/Makefile.am: Likewise.
* src/debug.c (gdbm_debug_printer)
(gdbm_debug_flags): New globals.
(gdbm_debug_token, gdbm_debug_parse_state)
(gdbm_debug_datum): New functions.
* src/gdbm.h.in [@GDBM_DEBUG_ENABLE@]: Define GDBM_DEBUG_ENABLE.
(gdbm_debug_printer_t): New typedef.
(gdbm_debug_printer, gdbm_debug_flags): New externs.
(GDBM_DEBUG_ERR,GDBM_DEBUG_OPEN)
(GDBM_DEBUG_READ,GDBM_DEBUG_STORE)
(GDBM_DEBUG_LOOKUP,GDBM_DEBUG_ALL): New defines.
(gdbm_debug_token,gdbm_debug_parse_state)
(gdbm_debug_datum): New protos.
* src/gdbmdefs.h (GDBM_DEBUG,GDBM_DEBUG_DATUM): New macros.
* src/findkey.c: Add debugging info.
* src/gdbmfetch.c: Likewise.
* src/gdbmopen.c: Likewise.
* src/gdbmseq.c: Likewise.
* src/gdbmstore.c: Likewise.
* src/gdbmtool.c (open_handler): Allow the use of ~/
(command) <repeat,variadic>: New members.
(run_command): Handle variadic functions.
(run_last_command): New command. In interactive mode,
repeats the last command if it was marked
with repeat=1 (currently, only "next").
New command: "debug".
(all functions): Use terror instead of fprintf(stderr,...);
* src/gdbmtool.h (handler_param) <vararg>: New member.
(run_last_command): New proto.
* src/gram.y: Call run_last_command) on empty input.
* tests/gtload.c: New option: -debug=
|
|
* configure.ac: New option --enable-debug
Print feature summary at the end of the run.
* src/debug.c: New file.
* src/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Build debug.o
Define GDBM_DEBUG_ENABLE.
* src/gdbmdefs.h [GDBM_DEBUG_ENABLE] (_gdbm_debug_hook_install)
(_gdbm_debug_hook_remove,_gdbm_debug_hook_check)
(_gdbm_debug_hook_val): New protos.
(GDBM_DEBUG_HOOK, GDBM_DEBUG_OVERRIDE)
(GDBM_DEBUG_ALLOC): New defines.
* src/gdbm.h.in (GDBM_RCVR_FORCE): New flag.
* src/recover.c (gdbm_recover): Check database before attempting
recovery, unless GDBM_RCVR_FORCE flag is set.
* doc/gdbm.texi: Document GDBM_RCVR_FORCE
* src/gdbmreorg.c (gdbm_reorganize): Use GDBM_RCVR_FORCE.
* src/gdbmtool.c (main): Always allocate file_name.
* src/bucket.c: Put GDBM_DEBUG_OVERRIDE and GDBM_DEBUG_ALLOC
in critical places.
* src/falloc.c: Likewise.
* src/findkey.c: Likewise.
* src/gdbmopen.c: Likewise.
* src/gdbmstore.c: Likewise.
* src/update.c: Likewise.
* tests/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Define GDBM_DEBUG_ENABLE.
* tests/gtload.c: New options -hook, -recover, -verbose,
-backup, -max-failures, -max-failed-keys,
and -max-failed-buckets.
Attempt recovery after errors.
|
|
* 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
|
|
* configure.ac: Check if GNU Readline is available.
* src/Makefile.am: Add new files.
* src/input-rl.c: New file.
* src/input-std.c: New file.
* src/gdbmtool.c (handler_param): Move declaration to
the header file.
(quit_handler): Call input_done.
(command_tab): Add the "history" command.
(command_generator): New function.
(slist_new_s, slist_new_l)
(slist_insert): New functions.
(main): Call input_init and input_done.
* src/gdbmtool.h: New protos.
* src/gram.y: Use slist_insert to construct string lists.
* src/lex.l (read_input): Remove. Use input_read instead.
(print_prompt_at_bol): New function.
(print_prompt): Remove.
(make_prompt): New function.
* NEWS: Document changes.
* README: Document readline support.
* doc/gdbm.texi: Document line editing in gdbmtool.
* doc/gdbmtool.1: Likewise.
|