diff options
author | adam <adam@pkgsrc.org> | 2017-03-20 06:02:26 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2017-03-20 06:02:26 +0000 |
commit | b4333331f2d9d433242ea19ac28445dae6dddeaf (patch) | |
tree | b50dc25e8dfcd2c57e8245ed5781fb5da2521eb7 /databases/gdbm_compat | |
parent | f994734aafa89ce0b48153368eff9f7209ce4115 (diff) | |
download | pkgsrc-b4333331f2d9d433242ea19ac28445dae6dddeaf.tar.gz |
Version 1.13 - 2017-03-11
* gdbm_fetch, gdbm_firstkey, and gdbm_nextkey behavior
If the requested key was not found, these functions return datum with
dptr pointing to NULL and set gdbm_errno to GDBM_ITEM_NOT_FOUND (in
prior releases, gdbm_errno was set to GDBM_NO_ERROR),
If an error occurred, dptr is set to NULL, and gdbm_errno to
the error code.
In any case gdbm_errno is guaranteed to have meaningful value upon
return.
* Error handling
In previous versions of GDBM, fatal errors (such as write error while
storing the key/data pair or bucket) caused immediate termination of
the program via call to exit(3). This is no longer the case.
Starting from this version, if a fatal error occurrs while modifying
the database file, that database is marked as needing recovery and
gdbm_errno is set to GDBM_NEED_RECOVERY. Calls to any GDBM functions,
except gdbm_recover, will then return immediately with the same error
code.
The function gdbm_recover examines the database file and fixes
eventual inconsistencies. Upon successful return it clears the error
state and makes the database operational again.
For backward compatibility, the fatal_func argument to gdbm_open is
retained and its functionality is not changed. If it is not NULL, the
new error handling procedures are disabled, the function it points to
will be called upon fatal errors. When it returns, exit(1) will be
called.
* Per-database error codes
In addition to gdbm_error global variable, the most recent error state
is saved in the GDBM_FILE structure. This facilitates error handling
when operating multiple GDBM databases simultaneously.
Diffstat (limited to 'databases/gdbm_compat')
-rw-r--r-- | databases/gdbm_compat/Makefile | 5 | ||||
-rw-r--r-- | databases/gdbm_compat/builtin.mk | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/databases/gdbm_compat/Makefile b/databases/gdbm_compat/Makefile index 5414207606c..647c46d85e9 100644 --- a/databases/gdbm_compat/Makefile +++ b/databases/gdbm_compat/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2014/10/09 14:06:05 wiz Exp $ +# $NetBSD: Makefile,v 1.8 2017/03/20 06:02:27 adam Exp $ .include "../../databases/gdbm/Makefile.common" @@ -12,7 +12,8 @@ CONFIGURE_ARGS+= --enable-libgdbm-compat BUILD_DIRS= compat -.include "../../databases/gdbm/buildlink3.mk" post-extract: ${LN} -s ${BUILDLINK_PREFIX.gdbm}/lib/libgdbm.la ${WRKSRC}/src + +.include "../../databases/gdbm/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/databases/gdbm_compat/builtin.mk b/databases/gdbm_compat/builtin.mk index 716b436435f..b5e7e864acc 100644 --- a/databases/gdbm_compat/builtin.mk +++ b/databases/gdbm_compat/builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: builtin.mk,v 1.4 2013/11/23 11:29:35 obache Exp $ +# $NetBSD: builtin.mk,v 1.5 2017/03/20 06:02:27 adam Exp $ BUILTIN_PKG:= gdbm_compat BUILTIN_FIND_HEADERS_VAR= NDBM_H @@ -52,7 +52,7 @@ USE_BUILTIN.gdbm_compat= yes . for _dep_ in ${BUILDLINK_API_DEPENDS.gdbm_compat} . if !empty(USE_BUILTIN.gdbm_compat:M[yY][eE][sS]) USE_BUILTIN.gdbm_compat!= \ - if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.gdbm_compat:Q}; then \ + if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.gdbm_compat}; then \ ${ECHO} "yes"; \ else \ ${ECHO} "no"; \ |