|
|
c7d609 |
glibc doesn't like errno as the name of a field.
|
|
|
c7d609 |
--- db.1.85/hash/hash.h Mon Feb 18 19:12:14 2002
|
|
|
c7d609 |
+++ db.1.85/hash/hash.h Mon Feb 18 19:12:20 2002
|
|
|
c7d609 |
@@ -103,7 +103,7 @@
|
|
|
c7d609 |
BUFHEAD *cpage; /* Current page */
|
|
|
c7d609 |
int cbucket; /* Current bucket */
|
|
|
c7d609 |
int cndx; /* Index of next item on cpage */
|
|
|
c7d609 |
- int errno; /* Error Number -- for DBM
|
|
|
c7d609 |
+ int err; /* Error Number -- for DBM
|
|
|
c7d609 |
* compatability */
|
|
|
c7d609 |
int new_file; /* Indicates if fd is backing store
|
|
|
c7d609 |
* or no */
|
|
|
c7d609 |
--- db.1.85/hash/hash.c Mon Feb 18 19:12:24 2002
|
|
|
c7d609 |
+++ db.1.85/hash/hash.c Mon Feb 18 19:12:44 2002
|
|
|
c7d609 |
@@ -505,7 +505,7 @@
|
|
|
c7d609 |
else
|
|
|
c7d609 |
if (wsize != sizeof(HASHHDR)) {
|
|
|
c7d609 |
errno = EFTYPE;
|
|
|
c7d609 |
- hashp->errno = errno;
|
|
|
c7d609 |
+ hashp->err = errno;
|
|
|
c7d609 |
return (-1);
|
|
|
c7d609 |
}
|
|
|
c7d609 |
for (i = 0; i < NCACHED; i++)
|
|
|
c7d609 |
@@ -536,7 +536,7 @@
|
|
|
c7d609 |
|
|
|
c7d609 |
hashp = (HTAB *)dbp->internal;
|
|
|
c7d609 |
if (flag) {
|
|
|
c7d609 |
- hashp->errno = errno = EINVAL;
|
|
|
c7d609 |
+ hashp->err = errno = EINVAL;
|
|
|
c7d609 |
return (ERROR);
|
|
|
c7d609 |
}
|
|
|
c7d609 |
return (hash_access(hashp, HASH_GET, (DBT *)key, data));
|
|
|
c7d609 |
@@ -553,11 +553,11 @@
|
|
|
c7d609 |
|
|
|
c7d609 |
hashp = (HTAB *)dbp->internal;
|
|
|
c7d609 |
if (flag && flag != R_NOOVERWRITE) {
|
|
|
c7d609 |
- hashp->errno = errno = EINVAL;
|
|
|
c7d609 |
+ hashp->err = errno = EINVAL;
|
|
|
c7d609 |
return (ERROR);
|
|
|
c7d609 |
}
|
|
|
c7d609 |
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
|
|
|
c7d609 |
- hashp->errno = errno = EPERM;
|
|
|
c7d609 |
+ hashp->err = errno = EPERM;
|
|
|
c7d609 |
return (ERROR);
|
|
|
c7d609 |
}
|
|
|
c7d609 |
return (hash_access(hashp, flag == R_NOOVERWRITE ?
|
|
|
c7d609 |
@@ -574,11 +574,11 @@
|
|
|
c7d609 |
|
|
|
c7d609 |
hashp = (HTAB *)dbp->internal;
|
|
|
c7d609 |
if (flag && flag != R_CURSOR) {
|
|
|
c7d609 |
- hashp->errno = errno = EINVAL;
|
|
|
c7d609 |
+ hashp->err = errno = EINVAL;
|
|
|
c7d609 |
return (ERROR);
|
|
|
c7d609 |
}
|
|
|
c7d609 |
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
|
|
|
c7d609 |
- hashp->errno = errno = EPERM;
|
|
|
c7d609 |
+ hashp->err = errno = EPERM;
|
|
|
c7d609 |
return (ERROR);
|
|
|
c7d609 |
}
|
|
|
c7d609 |
return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL));
|
|
|
c7d609 |
@@ -729,7 +729,7 @@
|
|
|
c7d609 |
|
|
|
c7d609 |
hashp = (HTAB *)dbp->internal;
|
|
|
c7d609 |
if (flag && flag != R_FIRST && flag != R_NEXT) {
|
|
|
c7d609 |
- hashp->errno = errno = EINVAL;
|
|
|
c7d609 |
+ hashp->err = errno = EINVAL;
|
|
|
c7d609 |
return (ERROR);
|
|
|
c7d609 |
}
|
|
|
c7d609 |
#ifdef HASH_STATISTICS
|
|
|
c7d609 |
--- db.1.85/hash/ndbm.c Mon Feb 18 19:12:58 2002
|
|
|
c7d609 |
+++ db.1.85/hash/ndbm.c Mon Feb 18 19:13:05 2002
|
|
|
c7d609 |
@@ -180,7 +180,7 @@
|
|
|
c7d609 |
HTAB *hp;
|
|
|
c7d609 |
|
|
|
c7d609 |
hp = (HTAB *)db->internal;
|
|
|
c7d609 |
- return (hp->errno);
|
|
|
c7d609 |
+ return (hp->err);
|
|
|
c7d609 |
}
|
|
|
c7d609 |
|
|
|
c7d609 |
extern int
|
|
|
c7d609 |
@@ -190,7 +190,7 @@
|
|
|
c7d609 |
HTAB *hp;
|
|
|
c7d609 |
|
|
|
c7d609 |
hp = (HTAB *)db->internal;
|
|
|
c7d609 |
- hp->errno = 0;
|
|
|
c7d609 |
+ hp->err = 0;
|
|
|
c7d609 |
return (0);
|
|
|
c7d609 |
}
|
|
|
c7d609 |
|