Blame SOURCES/db-1.85-errno.patch

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