aboutsummaryrefslogtreecommitdiff
path: root/compat/dbmstore.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-08-09 11:24:56 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-08-09 11:24:56 +0000
commit65c1e543036bb84666c3174c58289f572b6ad948 (patch)
treedfb0e8ef1d289ad6ff8b69af177d0f4025dbff1d /compat/dbmstore.c
parent926977cf9d571e12c04162613728cabebe073c53 (diff)
downloadgdbm-65c1e543036bb84666c3174c58289f572b6ad948.tar.gz
gdbm-65c1e543036bb84666c3174c58289f572b6ad948.tar.bz2
Implement dbm_error and dbm_clearerr.
* compat/ndbm.h (__gdbm_error_to_ndbm): New macro (dbm_error,dbm_clearerr): Provide prototypes instead of the macros. (DBM) <_dbm_errno>: New member. * compat/dbmerr.c: New file. * compat/Makefile.am (NDBM_CF): Add dbmerr.c * compat/dbmdelete.c: Make sure _dbm_errno reflects the actual error state. * compat/dbmfetch.c: Likewise. * compat/dbmseq.c: Likewise. * compat/dbmstore.c: Likewise.
Diffstat (limited to 'compat/dbmstore.c')
-rw-r--r--compat/dbmstore.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/compat/dbmstore.c b/compat/dbmstore.c
index 1b6636a..76c6232 100644
--- a/compat/dbmstore.c
+++ b/compat/dbmstore.c
@@ -29,5 +29,7 @@
int
dbm_store (DBM *dbm, datum key, datum content, int flags)
{
- return gdbm_store (dbm->file, key, content, flags);
+ int rc = gdbm_store (dbm->file, key, content, flags);
+ __gdbm_error_to_ndbm (dbm);
+ return rc;
}

Return to:

Send suggestions and report system problems to the System administrator.