+Fri Feb 13 14:37:47 1998 Tom Yu <tlyu@mit.edu>
+
+ * hash/hash.c (__kdb2_hash_open): Rename to avoid potential
+ collision with NetBSD libc.
+
+ * hash/dbm.c: Rename lots of functions to avoid colliding with
+ native dbm implementations.
+
+ * db/db.c (kdb2_dbopen): Rename to avoid colliding with NetBSD
+ libc.
+
Wed Jan 21 10:17:34 1998 Ezra Peisach <epeisach@mit.edu>
* btree/bt_open.c: Added O_BINARY for __CYGWIN32__.
static void no_open_db __P((void));
int
-dbminit(file)
+kdb2_dbminit(file)
char *file;
{
if (__cur_db != NULL)
- (void)dbm_close(__cur_db);
- if ((__cur_db = dbm_open(file, O_RDWR|O_BINARY, 0)) != NULL)
+ (void)kdb2_dbm_close(__cur_db);
+ if ((__cur_db = kdb2_dbm_open(file, O_RDWR|O_BINARY, 0)) != NULL)
return (0);
- if ((__cur_db = dbm_open(file, O_RDONLY|O_BINARY, 0)) != NULL)
+ if ((__cur_db = kdb2_dbm_open(file, O_RDONLY|O_BINARY, 0)) != NULL)
return (0);
return (-1);
}
datum
-fetch(key)
+kdb2_fetch(key)
datum key;
{
datum item;
item.dptr = 0;
return (item);
}
- return (dbm_fetch(__cur_db, key));
+ return (kdb2_dbm_fetch(__cur_db, key));
}
datum
-firstkey()
+kdb2_firstkey()
{
datum item;
item.dptr = 0;
return (item);
}
- return (dbm_firstkey(__cur_db));
+ return (kdb2_dbm_firstkey(__cur_db));
}
datum
-nextkey(key)
+kdb2_nextkey(key)
datum key;
{
datum item;
item.dptr = 0;
return (item);
}
- return (dbm_nextkey(__cur_db));
+ return (kdb2_dbm_nextkey(__cur_db));
}
int
-delete(key)
+kdb2_delete(key)
datum key;
{
if (__cur_db == NULL) {
no_open_db();
return (-1);
}
- return (dbm_delete(__cur_db, key));
+ return (kdb2_dbm_delete(__cur_db, key));
}
int
-store(key, dat)
+kdb2_store(key, dat)
datum key, dat;
{
if (__cur_db == NULL) {
no_open_db();
return (-1);
}
- return (dbm_store(__cur_db, key, dat, DBM_REPLACE));
+ return (kdb2_dbm_store(__cur_db, key, dat, DBM_REPLACE));
}
static void
* NULL on failure
*/
DBM *
-dbm_open(file, flags, mode)
+kdb2_dbm_open(file, flags, mode)
const char *file;
int flags, mode;
{
* Nothing.
*/
void
-dbm_close(db)
+kdb2_dbm_close(db)
DBM *db;
{
(void)(db->close)(db);
* NULL on failure
*/
datum
-dbm_fetch(db, key)
+kdb2_dbm_fetch(db, key)
DBM *db;
datum key;
{
* NULL on failure
*/
datum
-dbm_firstkey(db)
+kdb2_dbm_firstkey(db)
DBM *db;
{
int status;
* NULL on failure
*/
datum
-dbm_nextkey(db)
+kdb2_dbm_nextkey(db)
DBM *db;
{
int status;
* <0 failure
*/
int
-dbm_delete(db, key)
+kdb2_dbm_delete(db, key)
DBM *db;
datum key;
{
* 1 if DBM_INSERT and entry exists
*/
int
-dbm_store(db, key, content, flags)
+kdb2_dbm_store(db, key, content, flags)
DBM *db;
datum key, content;
int flags;
}
int
-dbm_error(db)
+kdb2_dbm_error(db)
DBM *db;
{
HTAB *hp;
}
int
-dbm_clearerr(db)
+kdb2_dbm_clearerr(db)
DBM *db;
{
HTAB *hp;
}
int
-dbm_dirfno(db)
+kdb2_dbm_dirfno(db)
DBM *db;
{
return(((HTAB *)db->internal)->fp);
/* OPEN/CLOSE */
extern DB *
-__hash_open(file, flags, mode, info, dflags)
+__kdb2_hash_open(file, flags, mode, info, dflags)
const char *file;
int32_t flags, mode, dflags;
const HASHINFO *info; /* Special directives for create */