summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-05-03 17:27:51 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-05-03 17:27:51 +0000
commit3ce312b75c1e80c476cd991ad38c1782f4893aaf (patch)
treef9107855b4792133eaf87c62d2fc0e87def1c7ea /include
parentc1f0251976473d54cc4d46ef0dbfd8a4e2910904 (diff)
Make ndbm match POSIX. A datum consists of a void *dptr and a size_t dsize.
Also make the open functions take a mode_t, not int. OK deraadt@
Diffstat (limited to 'include')
-rw-r--r--include/ndbm.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/ndbm.h b/include/ndbm.h
index 67ba56b379b..4c1efa9f189 100644
--- a/include/ndbm.h
+++ b/include/ndbm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ndbm.h,v 1.5 2003/06/02 19:34:12 millert Exp $ */
+/* $OpenBSD: ndbm.h,v 1.6 2004/05/03 17:27:50 millert Exp $ */
/* $NetBSD: ndbm.h,v 1.6 1995/07/20 23:31:11 jtc Exp $ */
/*-
@@ -54,25 +54,24 @@
#define DBM_SUFFIX ".db"
typedef struct {
- char *dptr;
- int dsize;
+ void *dptr;
+ size_t dsize;
} datum;
typedef DB DBM;
#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE
__BEGIN_DECLS
+int dbm_clearerr(DBM *);
void dbm_close(DBM *);
int dbm_delete(DBM *, datum);
+int dbm_error(DBM *);
datum dbm_fetch(DBM *, datum);
datum dbm_firstkey(DBM *);
-long dbm_forder(DBM *, datum);
datum dbm_nextkey(DBM *);
-DBM *dbm_open(const char *, int, int);
+DBM *dbm_open(const char *, int, mode_t);
int dbm_store(DBM *, datum, datum, int);
int dbm_dirfno(DBM *);
-int dbm_error(DBM *);
-int dbm_clearerr(DBM *);
int dbm_rdonly(DBM *);
__END_DECLS