* hash/dbm.c: Rename the errno member of HTAB
authorTom Yu <tlyu@mit.edu>
Sun, 21 Dec 1997 23:36:14 +0000 (23:36 +0000)
committerTom Yu <tlyu@mit.edu>
Sun, 21 Dec 1997 23:36:14 +0000 (23:36 +0000)
* 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
src/util/db2/hash/dbm.c
src/util/db2/hash/hash.c
src/util/db2/hash/hash.h

index fdabe09b0ea4d2eb9f7a7348da95ce245f9f7c76..41774ba89bca50e84173af05a58bfb1828444ae3 100644 (file)
@@ -1,3 +1,13 @@
+Sun Dec 21 18:33:14 1997  Tom Yu  <tlyu@mit.edu>
+
+       * 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  <eichin@cygnus.com>
 
        * db2: overflow_page fixes, __P redef
index c4ba92beb40dbfa5611a418e56ce4a136d259be2..474512775db155c6332e7ec95e3bd56f1acceb8d 100644 (file)
@@ -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);
 }
 
index 2811688adfae7ed7ff98ed1b63cc60d15481e3c3..e52275438d7d50fc77ae0e50e5d13e289466cec3 100644 (file)
@@ -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
index a12c8d4c2e493bcba632df01a466f17307580560..170c24c8679f4b3d902782eda2f9fcb03fa837bd 100644 (file)
@@ -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 */