summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* DESTDIR change in installbaserock/bootstrapAdnan Ali2012-01-311-1/+1
|
* Add output of bootstrapRichard Maw2012-01-1185-0/+128364
|
* Prefer to copy than symlinkRichard Maw2012-01-111-1/+1
|
* remove bootstrap step from morphRichard Maw2012-01-111-1/+0
|
* add morphRichard Maw2012-01-111-0/+14
| | | | lfs suggests the option for compatibility with older programs, it may not be needed
* Improve testgdbmSergey Poznyakoff2011-11-164-166/+276
| | | | | | | | | | | | | | | | * 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.
* Version 1.10.90Sergey Poznyakoff2011-11-153-2/+10
|
* Update the docs. Improve dump/load utilities.Sergey Poznyakoff2011-11-158-479/+747
| | | | | | | | | | | | | | | | | * 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.
* Return a meaningful error code if failed to restore file's metadata.Sergey Poznyakoff2011-11-157-17/+94
| | | | | | | | | | | | | | | | * 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.
* Document new flat format and related functions.Sergey Poznyakoff2011-11-142-69/+77
|
* Minor changesSergey Poznyakoff2011-11-141-32/+135
|
* Forgotten to add earlier.Sergey Poznyakoff2011-11-141-0/+66
|
* Update.Sergey Poznyakoff2011-11-142-2/+11
|
* Implement new dump format. Add new utilities: gdbm_dump and gdbm_load.Sergey Poznyakoff2011-11-1325-374/+2322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* UpdateSergey Poznyakoff2011-11-131-1/+1
|
* UpdateSergey Poznyakoff2011-11-131-0/+7
|
* Version 1.10Sergey Poznyakoff2011-11-132-7/+12
| | | | | * NEWS: Raise version number. * configure.ac: Raise version number.
* Minor fixSergey Poznyakoff2011-11-131-0/+1
| | | | * src/testgdbm.c (main): Call textdomain.
* Update the docs.Sergey Poznyakoff2011-11-122-9/+26
| | | | | * NEWS: Update. * doc/gdbm.texinfo: Update.
* Minor fixes.Sergey Poznyakoff2011-11-122-3/+3
| | | | | * src/Makefile.am: Use libgdbm_la_LIBADD, not just LIBADD. * src/testgdbm.c: Declare some function parameters with const qualifiers.
* Implement cloexec in gdbm_reorganize. Add test cases.Sergey Poznyakoff2011-11-1117-10/+437
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* Use SEEK_SET instead of L_SET.Sergey Poznyakoff2011-11-119-15/+16
|
* Support close-on-exec flag for gdbm_open call.Sergey Poznyakoff2011-11-117-30/+99
| | | | | | | | | | | | | | | * 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.
* Fix handling of NDBM databases in read-only mode.Sergey Poznyakoff2011-11-108-1/+123
| | | | | | | | | | * 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.
* Define GDBM_FILE_EOF.Sergey Poznyakoff2011-10-231-1/+2
|
* Fix bug #150.Sergey Poznyakoff2011-10-0512-61/+169
| | | | | | | | | | | | | | | | | | | 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.
* Initialize memory used for file header. This fixes bug #151.Sergey Poznyakoff2011-10-052-2/+8
|
* Minor fix.Sergey Poznyakoff2011-08-241-8/+6
| | | | * src/testgdbm.c: Minor fix.
* Implement multi-character commands in testgdbm.Sergey Poznyakoff2011-08-244-155/+276
| | | | | | * bootstrap (get_po): Discard output from cmp. * src/testgdbm.c: Implement multi-character commands. * doc/gdbm.texinfo: Update.
* Get po files.Sergey Poznyakoff2011-08-183-0/+48
| | | | | * bootstrap: Get PO files; create LINGUAS list * po/.cvsignore: Add LINGUAS.
* Make sure errno is preserved, if it can contain details about the gdbm error.Sergey Poznyakoff2011-08-175-19/+51
| | | | | | | | | | * 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.
* Introduce new error code.Sergey Poznyakoff2011-08-1711-583/+65
| | | | | | | | | | | | | | | * 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.
* Minor housekeeping for Gnits compliance.Sergey Poznyakoff2011-08-164-0/+172
| | | | | | * README-alpha: New file. * README-hacking: New file. * bootstrap: Update.
* Internationalization.Sergey Poznyakoff2011-08-1621-179/+1176
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * compat/Makefile.am (libgdbm_compat_la_LIBADD): Link against libgdbm.Sergey Poznyakoff2011-08-142-0/+6
|
* Improve release checking: use gnits.Sergey Poznyakoff2011-08-133-2/+18
| | | | | | | * configure.ac (AM_INIT_AUTOMAKE): Use gnits. (AC_INIT): Remove extra quoting from around version number to pacify gnits. * THANKS: New file.
* Verify preprocessor directives. Pass them through cppi toSergey Poznyakoff2011-08-1310-139/+155
| | | | reflect their nesting level.
* Version 1.9.1Sergey Poznyakoff2011-08-133-2/+14
|
* Bugfixes (pointed out by Matthew Burgess).Sergey Poznyakoff2011-08-123-2/+11
| | | | | * src/gdbmopen.c: Fix a typo. * tests/Makefile.am ($(srcdir)/package.m4): Fix improper dependency.
* Version 1.9Sergey Poznyakoff2011-08-122-2/+6
|
* Minor changes in the documentation.Sergey Poznyakoff2011-08-113-5/+22
|
* Add testcases for gdbm_setopt.Sergey Poznyakoff2011-08-117-0/+533
| | | | | | | | | * 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.
* New option GDBM_GETDBNAME.Sergey Poznyakoff2011-08-114-10/+60
| | | | | | * src/gdbm.h.in (GDBM_GETDBNAME): New option. * src/gdbmsetopt.c (gdbm_setopt): Handle GDBM_GETDBNAME. * doc/gdbm.texinfo (Options): Document GDBM_GETDBNAME.
* Protect invocations of _gdbm_mapped functions with #if HAVE_MMAP.Sergey Poznyakoff2011-08-102-0/+14
|
* Fix a typo.Sergey Poznyakoff2011-08-101-1/+1
|
* Improve gdbm_setopt interface.Sergey Poznyakoff2011-08-109-62/+228
| | | | | | | | | | | | | | | | * 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.
* Improve memory mapping support.Sergey Poznyakoff2011-08-1011-115/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Docs: "Additional information" section.Sergey Poznyakoff2011-08-104-8/+50
|
* Spell checking and minor fixes.Sergey Poznyakoff2011-08-091-3/+3
|
* Update the docs.Sergey Poznyakoff2011-08-092-55/+309
| | | | | * doc/gdbm.texinfo: Document compatibility functions, provide more cross-references.