summaryrefslogtreecommitdiff
path: root/lib/libc/db/hash
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 /lib/libc/db/hash
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 'lib/libc/db/hash')
-rw-r--r--lib/libc/db/hash/ndbm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libc/db/hash/ndbm.c b/lib/libc/db/hash/ndbm.c
index 6187996e97f..f8c5242d8f9 100644
--- a/lib/libc/db/hash/ndbm.c
+++ b/lib/libc/db/hash/ndbm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ndbm.c,v 1.17 2003/06/25 21:15:05 deraadt Exp $ */
+/* $OpenBSD: ndbm.c,v 1.18 2004/05/03 17:27:50 millert Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)dbm.c 8.6 (Berkeley) 11/7/95";
#else
-static const char rcsid[] = "$OpenBSD: ndbm.c,v 1.17 2003/06/25 21:15:05 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: ndbm.c,v 1.18 2004/05/03 17:27:50 millert Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -59,7 +59,7 @@ static const char rcsid[] = "$OpenBSD: ndbm.c,v 1.17 2003/06/25 21:15:05 deraadt
*/
static DBM *__cur_db;
-static DBM *_dbm_open(const char *, const char *, int, int);
+static DBM *_dbm_open(const char *, const char *, int, mode_t);
/*
* Returns:
@@ -192,7 +192,8 @@ static DBM *
_dbm_open(file, suff, flags, mode)
const char *file;
const char *suff;
- int flags, mode;
+ int flags;
+ mode_t mode;
{
HASHINFO info;
char path[MAXPATHLEN];
@@ -224,7 +225,8 @@ _dbm_open(file, suff, flags, mode)
DBM *
dbm_open(file, flags, mode)
const char *file;
- int flags, mode;
+ int flags;
+ mode_t mode;
{
return(_dbm_open(file, DBM_SUFFIX, flags, mode));