From 925f3d2f2a1183b625f98a893a7386519ac491e7 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Sun, 21 Dec 1997 23:36:14 +0000 Subject: [PATCH] * hash/dbm.c: Rename the errno member of HTAB * hash/hash.h: Rename the errno member of HTAB to local_errno to avoid a collision with a glibc macro. * hash/hash.c: Rename the errno member of HTAB to local_errno to avoid a collision with a glibc macro. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10342 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/db2/ChangeLog | 10 ++++++++++ src/util/db2/hash/dbm.c | 4 ++-- src/util/db2/hash/hash.c | 12 ++++++------ src/util/db2/hash/hash.h | 2 +- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/util/db2/ChangeLog b/src/util/db2/ChangeLog index fdabe09b0..41774ba89 100644 --- a/src/util/db2/ChangeLog +++ b/src/util/db2/ChangeLog @@ -1,3 +1,13 @@ +Sun Dec 21 18:33:14 1997 Tom Yu + + * hash/dbm.c: Rename the errno member of HTAB. + + * hash/hash.h: Rename the errno member of HTAB to local_errno to + avoid a collision with a glibc macro. + + * hash/hash.c: Rename the errno member of HTAB to local_errno to + avoid a collision with a glibc macro. + Mon Nov 11 17:01:29 1996 Mark Eichin * db2: overflow_page fixes, __P redef diff --git a/src/util/db2/hash/dbm.c b/src/util/db2/hash/dbm.c index c4ba92beb..474512775 100644 --- a/src/util/db2/hash/dbm.c +++ b/src/util/db2/hash/dbm.c @@ -328,7 +328,7 @@ dbm_error(db) HTAB *hp; hp = (HTAB *)db->internal; - return (hp->errno); + return (hp->local_errno); } int @@ -338,7 +338,7 @@ dbm_clearerr(db) HTAB *hp; hp = (HTAB *)db->internal; - hp->errno = 0; + hp->local_errno = 0; return (0); } diff --git a/src/util/db2/hash/hash.c b/src/util/db2/hash/hash.c index 2811688ad..e52275438 100644 --- a/src/util/db2/hash/hash.c +++ b/src/util/db2/hash/hash.c @@ -632,7 +632,7 @@ hash_get(dbp, key, data, flag) hashp = (HTAB *)dbp->internal; if (flag) { - hashp->errno = errno = EINVAL; + hashp->local_errno = errno = EINVAL; return (ERROR); } return (hash_access(hashp, HASH_GET, (DBT *)key, data)); @@ -649,11 +649,11 @@ hash_put(dbp, key, data, flag) hashp = (HTAB *)dbp->internal; if (flag && flag != R_NOOVERWRITE) { - hashp->errno = errno = EINVAL; + hashp->local_errno = errno = EINVAL; return (ERROR); } if ((hashp->flags & O_ACCMODE) == O_RDONLY) { - hashp->errno = errno = EPERM; + hashp->local_errno = errno = EPERM; return (ERROR); } return (hash_access(hashp, flag == R_NOOVERWRITE ? @@ -670,11 +670,11 @@ hash_delete(dbp, key, flag) hashp = (HTAB *)dbp->internal; if (flag) { - hashp->errno = errno = EINVAL; + hashp->local_errno = errno = EINVAL; return (ERROR); } if ((hashp->flags & O_ACCMODE) == O_RDONLY) { - hashp->errno = errno = EPERM; + hashp->local_errno = errno = EPERM; return (ERROR); } @@ -849,7 +849,7 @@ cursor_get(dbp, cursorp, key, val, flags) hashp = (HTAB *)dbp->internal; if (flags && flags != R_FIRST && flags != R_NEXT) { - hashp->errno = errno = EINVAL; + hashp->local_errno = errno = EINVAL; return (ERROR); } #ifdef HASH_STATISTICS diff --git a/src/util/db2/hash/hash.h b/src/util/db2/hash/hash.h index a12c8d4c2..170c24c86 100644 --- a/src/util/db2/hash/hash.h +++ b/src/util/db2/hash/hash.h @@ -94,7 +94,7 @@ typedef struct htab { /* Memory resident data structure */ u_int8_t *bigkey_buf; /* Temporary Buffer for BIG keys */ u_int16_t *split_buf; /* Temporary buffer for splits */ CURSOR *seq_cursor; /* Cursor used for hash_seq */ - int32_t errno; /* Error Number -- for DBM compatability */ + int32_t local_errno; /* Error Number -- for DBM compatability */ int32_t new_file; /* Indicates if fd is backing store or no */ int32_t save_file; /* Indicates whether we need to flush file at * exit */ -- 2.26.2