| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
lfs suggests the option for compatibility with older programs, it may not be needed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/mem.c (ealloc_die): Return EXIT_FATAL to the shell.
* src/testgdbm.c: Use emalloc, erealloc and estrdup for memory
allocation.
(syntax_error): New function.
(handler_param): New struct.
(all handlers): Change signature. Take a pointer to struct
handler_param as argument.
(export_handler,import_handler): Handle new formats.
(main): Take first argument to be the file name.
(optab): Remove -f argument. Hide -g, but retain it for
backward compatibility.
* doc/gdbm.texinfo: Update.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/gdbm.texinfo: Reorganize the material. Document gdbm_load
and gdbm_dump utilities.
* src/gdbm.h.in (GDBM_META_MASK_MODE)
(GDBM_META_MASK_OWNER): New constant.
(gdbm_load,gdbm_load_from_file): Take an additional argument:
meta_flags, which masks out restoring certain meta-data.
* src/gdbm_dump.c: Remove -b option. The -H option takes symbolic
format names. Use the standard exit codes.
* src/gdbm_load.c: New options: --mode, --user and --no-meta.
Use the standard exit codes.
* src/gdbmapp.h (EXIT_OK, EXIT_FATAL, EXIT_MILD)
(EXIT_USAGE): New constants.
* src/gdbmload.c (gdbm_load,gdbm_load_from_file): Take an
additional argument, which masks out restoring certain meta-data.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gdbm.h.in (GDBM_ERR_FILE_OWNER)
(GDBM_ERR_FILE_MODE): New error codes.
(_GDBM_MAX_ERRNO): Update.
* src/gdbmerrno.c (gdbm_errlist): Add new error codes.
* src/gdbmload.c (_set_gdbm_meta_info): Set gdbm_errno and
return 1 in case of errors.
(_gdbm_load_file): Propagate the return value from
_set_gdbm_meta_info.
* src/gdbm_load.c (main): Handle mild error conditions.
* export/export.c (usage): Print the GDBM version the program is
linked with.
* doc/gdbm.texinfo: Document changes.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac (AC_CHECK_HEADERS): Don't check for files that must
always be present. Check for getopt.h.
(AC_CHECK_FUNCS): Add getopt_long
* src/systems.h: Include useless #if's.
* src/flatfile.c: Split into two files:
* src/gdbmexp.c: ... this and ...
* src/gdbmimp.c: .., this
* src/mem.c: New file.
* src/base64.c: New file.
* src/gdbm_dump.c: New file.
* src/gdbm_load.c: New file.
* src/gdbmapp.h: New file.
* src/gdbmdump.c: New file.
* src/gdbmload.c: New file.
* src/parseopt.c: New file.
* src/progname.c: New file.
* src/.cvsignore: Update.
* src/Makefile.am (libgdbm_la_SOURCES): Add new files.
(noinst_LIBRARIES): New variable. Build libgdbmapp.a.
(libgdbmapp_a_SOURCES): New variable.
(bin_PROGRAMS): Add gdbm_load and gdbm_dump
(testgdbm_LDADD, gdbm_load_LDADD)
(gdbm_dump_LDADD): Add ./libgdbmapp.a
* src/gdbm.h.in: Include <stdio.h>
(gdbm_export_to_file)
(gdbm_import_from_file): New prototypes.
(GDBM_DUMP_FMT_BINARY,GDBM_DUMP_FMT_ASCII): New constants.
(gdbm_dump,gdbm_load)
(gdbm_dump_to_file,gdbm_load_from_file): New prototypes.
(GDBM_NO_DBNAME): New error code.
(_GDBM_MAX_ERRNO): Update.
* src/gdbmdefs.h (_GDBM_MAX_DUMP_LINE_LEN): New constant.
* src/gdbmerrno.c (gdbm_errlist): Add entry for GDBM_NO_DBNAME.
* src/proto.h (_gdbm_base64_encode,_gdbm_base64_decode)
(_gdbm_load,_gdbm_dump): New prototypes.
* src/testgdbm.c: Use gdbmapp interface for option parsing.
* export/export.c: Include gdbmexp.c
* export/.cvsignore: Update.
* doc/gdbm.texinfo: Update.
|
| |
|
| |
|
|
|
|
|
| |
* NEWS: Raise version number.
* configure.ac: Raise version number.
|
|
|
|
| |
* src/testgdbm.c (main): Call textdomain.
|
|
|
|
|
| |
* NEWS: Update.
* doc/gdbm.texinfo: Update.
|
|
|
|
|
| |
* src/Makefile.am: Use libgdbm_la_LIBADD, not just LIBADD.
* src/testgdbm.c: Declare some function parameters with const qualifiers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* compat/dbmopen.c: Apply O_CLOEXEC for newly created dir
file, if requested.
* src/gdbmdefs.h (gdbm_file_info) <cloexec>: New member.
* src/gdbmopen.c (gdbm_open): Initialize cloexec member.
* src/gdbmreorg.c (gdbm_reorganize): Propagate cloexec bit
to the new database.
* tests/.cvsignore: Update.
* tests/cloexec00.at: New test case.
* tests/cloexec01.at: Likewise.
* tests/cloexec02.at: Likewise.
* tests/cloexec03.at: Likewise.
* fdop.c: New auxiliary program.
* g_open_ce: New test program.
* g_reorg_ce: New test program.
* d_creat_ce: New test program.
* tests/Makefile.am: Add new test cases and test programs.
* tests/testsuite.at: Include new test cases.
* doc/gdbm.texinfo: Minor change.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gdbm.h.in (GDBM_CLOEXEC): New flag.
* src/systems.h [O_CLOEXEC]: Provide a placeholder definition.
* src/gdbmopen.c (gdbm_open): Honor the GDBM_CLOEXEC flag.
* compat/dbmopen.c (ndbm_open_dir_file0): Mask out open mode
before comparing with GDBM_READER.
Support GDBM_CLOEXEC.
(dbm_open): Translate O_CLOEXEC to GDBM_CLOEXEC.
* doc/gdbm.texinfo: Document GDBM_CLOEXEC.
* NEWS: Update.
|
|
|
|
|
|
|
|
|
|
| |
* compat/dbmopen.c (ndbm_open_dir_file0): Open dir file in
read-only mode if the database is being opened as GDBM_READER.
* tests/dbmcvt.at: New file.
* tests/dbmfetch02.at: New file.
* tests/dbmfetch03.at: New file.
* tests/Makefile.am (TESTSUITE_AT): Add new files.
* tests/testsuite.at: Include new testcases.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tolerate I/O operations returning less bytes than expected. Retry I/O
if possible.
* src/fullio.c: New file.
* src/Makefile.am (libgdbm_la_SOURCES): Add fullio.c
* src/proto.h (_gdbm_full_read)
(_gdbm_full_write): New protos.
* src/gdbmerrno.c (gdbm_errlist): Add entry for GDBM_FILE_EOF.
* src/bucket.c: Use _gdbm_full_{read|write}.
* src/falloc.c: Likewise.
* src/findkey.c: Likewise.
* src/gdbmopen.c: Likewise.
* src/gdbmstore.c: Likewise.
* src/testgdbm.c: Likewise.
* src/update.c: Likewise.
|
| |
|
|
|
|
| |
* src/testgdbm.c: Minor fix.
|
|
|
|
|
|
| |
* bootstrap (get_po): Discard output from cmp.
* src/testgdbm.c: Implement multi-character commands.
* doc/gdbm.texinfo: Update.
|
|
|
|
|
| |
* bootstrap: Get PO files; create LINGUAS list
* po/.cvsignore: Add LINGUAS.
|
|
|
|
|
|
|
|
|
|
| |
* src/gdbmdefs.h (SAVE_ERRNO): New macro.
* src/gdbmopen.c: Use SAVE_ERRNO where it is important to
preserve system errno.
* src/mmap.c: Likewise.
* doc/gdbm.texinfo: Document which gdbm errors can
be detailed by inspecting the system errno.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac, NEWS: Raise patchlevel to 90.
* src/gdbm.h.in: Enclose entire file in conditional
extern "C".
(GDBM_FILE_STAT_ERROR): New error code.
(_GDBM_MAX_ERRNO): Update.
* src/gdbmerrno.c (gdbm_errlist): Update.
* src/gdbmopen.c: Set GDBM_FILE_STAT_ERROR on fstat
failure.
* src/gdbmreorg.c: Likewise.
* src/mmap.c: Likewise.
* src/systems.h: Include errno.h
* gdbm.texinfo: Document GDBM_FILE_STAT_ERROR.
|
|
|
|
|
|
| |
* README-alpha: New file.
* README-hacking: New file.
* bootstrap: Update.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile.am (SUBDIRS): Add po.
(EXTRA_DIST): Add build-aux/config.rpath.
* configure.ac (AC_CONFIG_FILES): Add po/Makefile.in.
* bootstrap: New file.
* src/Makefile.am (AM_CPPFLAGS): Define LOCALEDIR
(noinst_HEADERS): Add gettext.h
(LIBADD): New variable.
* src/gettext.h: New file.
* po/.cvsignore: New file.
* po/Makevars: New file.
* po/POTFILES.in: New file.
* src/gdbmdefs.h: Define DEFAULT_TEXT_DOMAIN, _, N_
Include gettext.h
* src/bucket.c: Add NLS markers.
* src/falloc.c: Likewise.
* src/findkey.c: Likewise.
* src/gdbmerrno.c: Likewise.
* src/gdbmfetch.c: Likewise.
* src/gdbmseq.c: Likewise.
* src/gdbmstore.c: Likewise.
* src/update.c: Likewise.
* src/testgdbm.c: Add NLS markers.
(main): Initialize I18N.
|
| |
|
|
|
|
|
|
|
| |
* configure.ac (AM_INIT_AUTOMAKE): Use gnits.
(AC_INIT): Remove extra quoting from around version number
to pacify gnits.
* THANKS: New file.
|
|
|
|
| |
reflect their nesting level.
|
| |
|
|
|
|
|
| |
* src/gdbmopen.c: Fix a typo.
* tests/Makefile.am ($(srcdir)/package.m4): Fix improper dependency.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* tests/gtopt.c: New file
* tests/.cvsignore: Update.
* tests/setopt00.at: New testcase.
* tests/setopt01.at: New testcase.
* tests/Makefile.am: Build gtopt. Add setopt00.at and setopt01.at.
* tests/testsuite.at: Include setopt00.at and setopt01.at.
|
|
|
|
|
|
| |
* src/gdbm.h.in (GDBM_GETDBNAME): New option.
* src/gdbmsetopt.c (gdbm_setopt): Handle GDBM_GETDBNAME.
* doc/gdbm.texinfo (Options): Document GDBM_GETDBNAME.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/gdbm.h.in (GDBM_OPENMASK): New constant.
* src/gdbmconst.h: Remove constants duplicated in
gdbm.h.in.
* src/gdbmdefs.h (gdbm_file_info) <allow_mmap>
<mmap_inited>: Replace with a single member: memory_mapping.
All callers updated.
(GDBM_SETCACHESIZE,GDBM_SETSYNCMODE)
(GDBM_SETCENTFREE,GDBM_SETCOALESCEBLKS): New option names.
(GDBM_SETMMAP,GDBM_GETMMAP,GDBM_GETFLAGS)
(GDBM_GETCACHESIZE,GDBM_GETSYNCMODE,GDBM_GETCENTFREE)
(GDBM_GETCOALESCEBLKS,GDBM_GETMAXMAPSIZE): New option codes.
* src/gdbmsetopt.c: Implement new options.
* doc/gdbm.texinfo: Document new options.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new code is more flexible and performs better when
lots of inserts are being made (e.g. when populating the
database with new data).
* src/gdbm.h.in (GDBM_SETMAXMAPSIZE): New constant.
* src/gdbmconst.h (SIZE_T_MAX): New define.
* src/gdbmdefs.h (gdbm_file_info) <cache_size>: Change type
to size_t.
<mmap_inited,mapped_size_max>: New member.
<mapped_remap>: Remove.
* src/gdbmopen.c: Fix a typo.
(gdbm_open): Initialize new members.
(_gdbm_init_cache): Second argument is size_t.
* src/gdbmsetopt.c (gdbm_setopt): Optval argument is void*.
Handle GDBM_SETMAXMAPSIZE.
Improve error checking.
* src/mmap.c (_GDBM_IN_MAPPED_REGION_P): Fix comparison with
the lower bound.
(_GDBM_NEED_REMAP): Return true if mapped_region is NULL.
(SUM_FILE_SIZE): Rewrite.
(_gdbm_mapped_unmap): Don't call msync.
(_gdbm_internal_remap): Take 2 arguments, the second one
giving the new mapped size.
Unmap the region prior to remapping it.
Always pass NULL as the argument to mmap.
(_gdbm_mapped_remap): Rewrite the logic. Change semantics of the
third argument. All uses updated.
(_gdbm_mapped_init): Reflect the above changes.
(_gdbm_mapped_read,_gdbm_mapped_write): Use mmap_inited to decide
whether to use mmap, because mapped_region can be reset to zero
by another functions (namely, _gdbm_mapped_lseek).
Reset mmap_inited to FALSE, if _gdbm_mapped_remap fails.
(_gdbm_mapped_lseek): Rewrite offset computations. Invalidate
the mapped region.
* src/proto.h (_gdbm_init_cache): Change prototype.
* src/update.c (write_header, _gdbm_end_update): Remove checks
for dbf->mapped_region.
* tests/gtload.c: Implement the -maxmap option (set maximal
mapped memory size).
* doc/gdbm.texinfo: Document GDBM_SETMAXMAPSIZE.
|
| |
|
| |
|
|
|
|
|
| |
* doc/gdbm.texinfo: Document compatibility functions,
provide more cross-references.
|