diff options
author | Tom Yu <tlyu@mit.edu> | 1998-02-13 19:42:12 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 1998-02-13 19:42:12 +0000 |
commit | fbe3d840c25d637dbcadd9925a30293f52a46e96 (patch) | |
tree | d193b97a36e2b9c9e81cf84b62a3c4fd3982873e /src | |
parent | 3bbba4d6589f800f18caad7713853808054df9cc (diff) | |
download | krb5-fbe3d840c25d637dbcadd9925a30293f52a46e96.zip krb5-fbe3d840c25d637dbcadd9925a30293f52a46e96.tar.gz krb5-fbe3d840c25d637dbcadd9925a30293f52a46e96.tar.bz2 |
* 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.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10431 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/util/db2/ChangeLog | 11 | ||||
-rw-r--r-- | src/util/db2/db/db.c | 2 | ||||
-rw-r--r-- | src/util/db2/hash/dbm.c | 48 | ||||
-rw-r--r-- | src/util/db2/hash/hash.c | 2 |
4 files changed, 37 insertions, 26 deletions
diff --git a/src/util/db2/ChangeLog b/src/util/db2/ChangeLog index d3581d7..db69fcd 100644 --- a/src/util/db2/ChangeLog +++ b/src/util/db2/ChangeLog @@ -1,3 +1,14 @@ +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__. diff --git a/src/util/db2/db/db.c b/src/util/db2/db/db.c index e236afb..fba7795 100644 --- a/src/util/db2/db/db.c +++ b/src/util/db2/db/db.c @@ -45,7 +45,7 @@ static char sccsid[] = "@(#)db.c 8.4 (Berkeley) 2/21/94"; #include "db-int.h" DB * -dbopen(fname, flags, mode, type, openinfo) +kdb2_dbopen(fname, flags, mode, type, openinfo) const char *fname; int flags, mode; DBTYPE type; diff --git a/src/util/db2/hash/dbm.c b/src/util/db2/hash/dbm.c index 7b83da0..50921de 100644 --- a/src/util/db2/hash/dbm.c +++ b/src/util/db2/hash/dbm.c @@ -68,20 +68,20 @@ static DBM *__cur_db; 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; @@ -91,11 +91,11 @@ fetch(key) item.dptr = 0; return (item); } - return (dbm_fetch(__cur_db, key)); + return (kdb2_dbm_fetch(__cur_db, key)); } datum -firstkey() +kdb2_firstkey() { datum item; @@ -104,11 +104,11 @@ firstkey() 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; @@ -118,29 +118,29 @@ nextkey(key) 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 @@ -155,7 +155,7 @@ no_open_db() * NULL on failure */ DBM * -dbm_open(file, flags, mode) +kdb2_dbm_open(file, flags, mode) const char *file; int flags, mode; { @@ -178,7 +178,7 @@ dbm_open(file, flags, mode) * Nothing. */ void -dbm_close(db) +kdb2_dbm_close(db) DBM *db; { (void)(db->close)(db); @@ -190,7 +190,7 @@ dbm_close(db) * NULL on failure */ datum -dbm_fetch(db, key) +kdb2_dbm_fetch(db, key) DBM *db; datum key; { @@ -221,7 +221,7 @@ dbm_fetch(db, key) * NULL on failure */ datum -dbm_firstkey(db) +kdb2_dbm_firstkey(db) DBM *db; { int status; @@ -247,7 +247,7 @@ dbm_firstkey(db) * NULL on failure */ datum -dbm_nextkey(db) +kdb2_dbm_nextkey(db) DBM *db; { int status; @@ -273,7 +273,7 @@ dbm_nextkey(db) * <0 failure */ int -dbm_delete(db, key) +kdb2_dbm_delete(db, key) DBM *db; datum key; { @@ -301,7 +301,7 @@ dbm_delete(db, 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; @@ -322,7 +322,7 @@ dbm_store(db, key, content, flags) } int -dbm_error(db) +kdb2_dbm_error(db) DBM *db; { HTAB *hp; @@ -332,7 +332,7 @@ dbm_error(db) } int -dbm_clearerr(db) +kdb2_dbm_clearerr(db) DBM *db; { HTAB *hp; @@ -343,7 +343,7 @@ dbm_clearerr(db) } int -dbm_dirfno(db) +kdb2_dbm_dirfno(db) DBM *db; { return(((HTAB *)db->internal)->fp); diff --git a/src/util/db2/hash/hash.c b/src/util/db2/hash/hash.c index 8e9f7f0..0f51d6c 100644 --- a/src/util/db2/hash/hash.c +++ b/src/util/db2/hash/hash.c @@ -94,7 +94,7 @@ u_int32_t hash_accesses, hash_collisions, hash_expansions, hash_overflows, /* 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 */ |