Blame SOURCES/db-1.85-errno.patch

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