diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-09 11:24:56 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-08-09 11:24:56 +0000 |
commit | 65c1e543036bb84666c3174c58289f572b6ad948 (patch) | |
tree | dfb0e8ef1d289ad6ff8b69af177d0f4025dbff1d /compat/dbmstore.c | |
parent | 926977cf9d571e12c04162613728cabebe073c53 (diff) | |
download | gdbm-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.c | 4 |
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; } |