aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
4 daysInclude timestamp in the NEWS entryHEADmasterSergey Poznyakoff1
4 daysVersion 1.22v1.22Sergey Poznyakoff3
5 daysgdbm_recover does not disable crash toleranceSergey Poznyakoff2
* src/recover.c (_gdbm_finish_transfer): Remove call to _gdbmsync_done. * doc/gdbm.texi: Reflect the changes.
5 daysRevise the GDBM ManualSergey Poznyakoff2
6 daysEscape Makefile variable references in AC_PATH_PROGSergey Poznyakoff1
6 daysChange build process: explicitly require bison and flexSergey Poznyakoff4
6 daysUpdate the docsSergey Poznyakoff8
* Makefile.am: Use plain git log to format the ChangeLog. * git2chg.awk: Remove. * NOTE-WARNING: Update. * README: Likewise. * README-alpha: Likewise. * README-hacking: Likewise. * doc/gdbm.3: Likewise. * doc/gdbm.texi
12 daysImprove documentationSergey Poznyakoff2
13 daysUpdate configure.acSergey Poznyakoff1
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.
2021-09-19Fix key verification in sequential access.Sergey Poznyakoff3
This fixes https://oss-fuzz.com/testcase-detail/6317999997452288 and improves 4046a0af. * src/bucket.c (gdbm_dir_entry_valid_p): Move to proto. * src/proto.h (gdbm_dir_entry_valid_p): New inline function. * src/gdbmseq.c (gdbm_valid_key_p): Use gdbm_dir_entry_valid_p to validate the buffer index. Reorder the checks.
2021-09-16Fix computation of dbf->avail->count after pushing new avail block.Sergey Poznyakoff1
This is a very long-standing bug that caused a loss of an avail entry if the original avail table had odd number of entries. * src/falloc.c (push_avail_block): Fix computation of dbf->avail->count.
2021-09-16Fix typoSergey Poznyakoff1
2021-09-15Remove a left-over note from the READMESergey Poznyakoff1
2021-09-09Add missing includeSergey Poznyakoff1
* src/gdbmtool.h: Include string.h
2021-09-09Fix stack overflow in print_usageSergey Poznyakoff1
* src/parseopt.c (print_usage): Fix length calculation for long options.
2021-09-07Reset TERM for dejagnu testsuiteSergey Poznyakoff1
See https://puszcza.gnu.org.ua/bugs/index.php?520 * tests/gdbmtool/config/default.exp: Set TERM to empty string.
2021-09-07Fix testing with DejaGNU 1.6.3Sergey Poznyakoff5
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
2021-09-07Determine if st_mtim is present in struct statSergey Poznyakoff4
* 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.
2021-09-05Fix file header validationSergey Poznyakoff1
* src/gdbmopen.c (validate_header_std) (validate_header_numsync): Check if bucket_size is > 0.
2021-09-05Revert "Request gettext version 0.18 or newer"Sergey Poznyakoff1
This requires autoconf 2.70. Reverted until it is spread wide enough.
2021-09-04Request gettext version 0.18 or newerSergey Poznyakoff1
2021-09-03Minor changeSergey Poznyakoff1
2021-09-03gdbm_fuzzer: use atexit to free memory allocated for script bufferSergey Poznyakoff1
* fuzz/gdbm_fuzzer.c: (fuzzer_exit): New function. (LLVMFuzzerInitialize): Register atexit handler.
2021-09-03Add seed builder script and runcom file for gdbm_fuzzerSergey Poznyakoff2
2021-09-03Add gdbm_fuzzer.cSergey Poznyakoff1
2021-09-03Change semantics of the errorexit variable.Sergey Poznyakoff4
The "errorexit" variable is a string variable with the same syntax as errormask. If a GDBM error is reported and the corresponding gdbm_errno value is listed in this variable, further script execution is aborted. Setting it as boolean value is equivalent to set errorexit="all". * src/gdbmshell.c (all handlers): Return a GDBMSHELL_* error code. (closedb): Unset the fd variable only after closing the database. (run_command): If handler reported GDBM error and gdbm_errno is listed in the errorexit variable, return 1 (which will cause YYABORT in parser). * src/gdbmtool.h (VAR_ERR_GDBM): New variable error code. (variable_has_errno): New function. (gdbm_error_is_masked): Rewrite using variable_has_errno. * src/gram.y: Abort if run_command or run_last_command return !0. Handle VAR_ERR_GDBM. * src/var.c (variable): New member: data. (errorexit variable): Change type to VART_STRING; install sethook and typeconv. (variable_unset): When unsetting string variable, free and reset its value. (cachesize_sethook,centfree_sethook) (coalesce_sethook): Return VAR_ERR_GDBM on gdbmshell_setopt error. (errormask_sethook): Keep the mask vector in the data member. Handle conversions from boolean. (errorexit_sethook): Call errormask_sethook unless in interactive session.
2021-09-03Minor changeSergey Poznyakoff1
* tests/gtconv.c (main): Free allocated memory before exit.
2021-09-03bootstrap: options for disable po download and for updating po filesSergey Poznyakoff1
2021-09-03Minor changeSergey Poznyakoff1
* src/gdbmshell.c (command_type): Change initializer. (gdbmshell_run): Initialize the .len member.
2021-09-03gdbmtool: new command "perror"; new options -t, -T; improve timing outputSergey Poznyakoff3
* doc/gdbm.texi: Document the perror command. * src/gdbmshell.c: New command: perror. (run_command): In timing mode, print also user and system CPU times. Print traces on stderr. * src/gdbmtool.c: New options: -t (--trace) and -T (--timing).
2021-09-03gdbmtool: optionally print command trace (controlled by the "trace" variable)Sergey Poznyakoff2
* src/gdbmshell.c (run_command): Print command trace if requested. Prefix timing info with the name of the command. * src/var.c: New variable: trace.
2021-09-03gdbmtool: optionally print real execution time at the end of each commandSergey Poznyakoff2
* src/gdbmshell.c (run_command): Print real execution time, if the "timing" variable is set. * src/var.c: New boolean variable: timing
2021-09-03run_command: use error code from beginSergey Poznyakoff1
2021-09-03Allow for [+-]all in the errormask valueSergey Poznyakoff1
2021-09-03New gdbmtool variables: errorexit and errormask.Sergey Poznyakoff5
Boolean errorexit controls whether script terminates upon first erroneous return from run_command or its derivatives. The variable can be set only in non-interactive mode. errormask is a comma-delimited list of GDBM error codes that are masked, i.e. that won't trigger a diagnostic message if they occur. * src/gdbmshell.c (all handlers): Return integer value indicating success (0) or failure (!0). * src/gdbmtool.h (input_context_drain): New function. (run_last_command): Return integer. * src/gram.y: abort if run_command returns error and "errorexit" is set. * src/input-argv.c (instream_argv_read): Bugfix. * src/lex.l (input_context_drain): New function. * src/var.c: New variables: errorexit and errormask.
2021-09-03Add gdbmshell.c to POTFILES.inSergey Poznyakoff3
2021-09-02Version 1.21 releasedv1.21Sergey Poznyakoff3
2021-08-27Version 1.21Sergey Poznyakoff2
2021-08-18Minor fixSergey Poznyakoff1
* src/input-argv.c ((instream_argv_read): Fix escaping of special characters.
2021-08-13Revise gdbmtool error messagesSergey Poznyakoff3
* src/gdbmshell.c: Revise error messages. Use dberror where appropriate. * src/gdbmtool.h (dberror): New proto. * src/gram.y (dberror): New function.
2021-08-13gdbmtool: always provide stdin streamSergey Poznyakoff6
* src/Makefile.am (libgdbmapp_a_SOURCES): Add input-std.c * src/gdbmshell.c (input_history_begin): Improve diagnostic message. * src/gdbmtool.c (instream_default_create): New define. (gdbmtool_init): Use instream_default_create. * src/gdbmtool.h [WITH_READLINE] (instream_readline_create_: New proto. (input_stream_name): New proto. * src/input-rl.c (instream_stdin_create): Rename to instream_readline_create. Fall back to instream_stdin_create if stdin is not connected to a tty. * src/lex.l (input_stream_name): New function.
2021-08-13Re-implement input history handling to minimize linking requirementsSergey Poznyakoff9
Applications using gbdmshell don't need to link with libreadline, unless they use instream_stdin_create with readline support. * src/gdbmshell.c (input_history_begin) (input_history_handler): New functions. (gdbmshell_run): Remove calls to input_init()/input_done(). * src/gdbmtool.h (instream): New fields: in_history_size, in_history_get. (input_init,input_done): Remove. (instream_history_size,instream_history_get): New functions. (input_history_handler,input_history_begin): Remove. * src/input-rl.c: Incorporate history handling into the stream itself. * src/input-std.c (input_init,input_done): Remove placeholders. * src/lex.l (input_history_size,input_history_get): New functions.
2021-08-12Update docsSergey Poznyakoff2
* NEWS: Document changes. * doc/gdbm.texi: Document new variables.
2021-08-12Fix NULL dereference in gdbmshell. Undefine "fd" upon closing the database.Sergey Poznyakoff3
2021-08-12gdbmtool: setting database option affects the current databaseSergey Poznyakoff3
* src/gdbmshell.c (gdbmshell_setopt): New function. * src/gdbmtool.h (gdbmshell_setopt): New proto. * src/var.c: Provide set hooks for: cachesize, coalesce, and centfree.
2021-08-12gdbmshell: get rid of remaining globalsSergey Poznyakoff8
Use gdbmshell variables instead * src/gdbmshell.c (file_name, file_descr) (open_mode, open_format): Remove globals. (opendb,checkdb) (open_handler,import_handler) (status_handler): Use variables instead of globals. (command_tab): Mark the "open" parameter as optional. * src/gdbmtool.c (gdbmtool_init): Use variables instead of globals. * src/gdbmtool.h (file_name, file_descr) (open_mode, open_format): Remove globals. * src/lex.l: Use variables instead of globals. * src/var.c (variable): Rename hook to sethook. New field: typeconv. (vartab): New variables: "filename", "fd". (variable_get): Use typeconv if provided. * tests/gdbmtool/base.exp: Fix expected output. * tests/gdbmtool00.at: Likewise. * tests/gdbmtool01.at: Likewise.
2021-08-12gdbmtool: bugfixesSergey Poznyakoff2
* src/gdbmshell.c (datum_free): New function. Use it whenever a datum's dptr needs to be freed. (gdbmshell_run): Initialize last_cmd and last_args at the start and free last_args before returning. * src/util.c (vgetyn): Copy ap to a temporary va_list
2021-08-11Fix duplicated mmap in gdbm_recoverSergey Poznyakoff1
* src/recover.c (_gdbm_finish_transfer): Reuse memory mapping from the intermediate dbm structure.
2021-08-11Minor fixSergey Poznyakoff1
* src/gdbmshell.c (opendb): Force GDBM_CLOERROR when calling gdbm_fd_open.
2021-08-11Minor change in argv streamSergey Poznyakoff1
* src/input-argv.c (instream_argv_read): Don't treat = specially.

Return to:

Send suggestions and report system problems to the System administrator.