else
if (wsize != sizeof(HASHHDR)) {
errno = EFTYPE;
- hashp->errno = errno;
+ hashp->err = errno;
return (-1);
}
for (i = 0; i < NCACHED; i++)
hashp = (HTAB *)dbp->internal;
if (flag) {
- hashp->errno = errno = EINVAL;
+ hashp->err = errno = EINVAL;
return (ERROR);
}
return (hash_access(hashp, HASH_GET, (DBT *)key, data));
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_NOOVERWRITE) {
- hashp->errno = errno = EINVAL;
+ hashp->err = errno = EINVAL;
return (ERROR);
}
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
- hashp->errno = errno = EPERM;
+ hashp->err = errno = EPERM;
return (ERROR);
}
return (hash_access(hashp, flag == R_NOOVERWRITE ?
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_CURSOR) {
- hashp->errno = errno = EINVAL;
+ hashp->err = errno = EINVAL;
return (ERROR);
}
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
- hashp->errno = errno = EPERM;
+ hashp->err = errno = EPERM;
return (ERROR);
}
return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL));
hashp = (HTAB *)dbp->internal;
if (flag && flag != R_FIRST && flag != R_NEXT) {
- hashp->errno = errno = EINVAL;
+ hashp->err = errno = EINVAL;
return (ERROR);
}
#ifdef HASH_STATISTICS
+++ /dev/null
-glibc doesn't like errno as the name of a field.
---- db.1.85/hash/hash.h Mon Feb 18 19:12:14 2002
-+++ db.1.85/hash/hash.h Mon Feb 18 19:12:20 2002
-@@ -103,7 +103,7 @@
- BUFHEAD *cpage; /* Current page */
- int cbucket; /* Current bucket */
- int cndx; /* Index of next item on cpage */
-- int errno; /* Error Number -- for DBM
-+ int err; /* Error Number -- for DBM
- * compatability */
- int new_file; /* Indicates if fd is backing store
- * or no */
---- db.1.85/hash/hash.c Mon Feb 18 19:12:24 2002
-+++ db.1.85/hash/hash.c Mon Feb 18 19:12:44 2002
-@@ -505,7 +505,7 @@
- else
- if (wsize != sizeof(HASHHDR)) {
- errno = EFTYPE;
-- hashp->errno = errno;
-+ hashp->err = errno;
- return (-1);
- }
- for (i = 0; i < NCACHED; i++)
-@@ -536,7 +536,7 @@
-
- hashp = (HTAB *)dbp->internal;
- if (flag) {
-- hashp->errno = errno = EINVAL;
-+ hashp->err = errno = EINVAL;
- return (ERROR);
- }
- return (hash_access(hashp, HASH_GET, (DBT *)key, data));
-@@ -553,11 +553,11 @@
-
- hashp = (HTAB *)dbp->internal;
- if (flag && flag != R_NOOVERWRITE) {
-- hashp->errno = errno = EINVAL;
-+ hashp->err = errno = EINVAL;
- return (ERROR);
- }
- if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
-- hashp->errno = errno = EPERM;
-+ hashp->err = errno = EPERM;
- return (ERROR);
- }
- return (hash_access(hashp, flag == R_NOOVERWRITE ?
-@@ -574,11 +574,11 @@
-
- hashp = (HTAB *)dbp->internal;
- if (flag && flag != R_CURSOR) {
-- hashp->errno = errno = EINVAL;
-+ hashp->err = errno = EINVAL;
- return (ERROR);
- }
- if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
-- hashp->errno = errno = EPERM;
-+ hashp->err = errno = EPERM;
- return (ERROR);
- }
- return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL));
-@@ -729,7 +729,7 @@
-
- hashp = (HTAB *)dbp->internal;
- if (flag && flag != R_FIRST && flag != R_NEXT) {
-- hashp->errno = errno = EINVAL;
-+ hashp->err = errno = EINVAL;
- return (ERROR);
- }
- #ifdef HASH_STATISTICS
---- db.1.85/hash/ndbm.c Mon Feb 18 19:12:58 2002
-+++ db.1.85/hash/ndbm.c Mon Feb 18 19:13:05 2002
-@@ -180,7 +180,7 @@
- HTAB *hp;
-
- hp = (HTAB *)db->internal;
-- return (hp->errno);
-+ return (hp->err);
- }
-
- extern int
-@@ -190,7 +190,7 @@
- HTAB *hp;
-
- hp = (HTAB *)db->internal;
-- hp->errno = 0;
-+ hp->err = 0;
- return (0);
- }
-
Release: 11
Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
# other patches
-Patch20: db-1.85-errno.patch
Patch22: db-4.6.21-1.85-compat.patch
Patch24: db-4.5.20-jni-include-dir.patch
# License clarification patch
%prep
%setup -q -n db-%{version}
-pushd db.1.85
-%patch20 -p1 -b .errno
-popd
-
%patch22 -p1 -b .185compat
%patch24 -p1 -b .4.5.20.jni
%patch25 -p1 -b .licensefix