update Sat Sep 12 12:37:01 PDT 2009
[pkgsrc.git] / wip / db1 / patches / patch-ad
1 $NetBSD$
2
3 --- ./hash/hash.c.orig  1997-01-04 20:25:41.000000000 +0100
4 +++ ./hash/hash.c       2004-07-03 16:08:15.000000000 +0200
5 @@ -620,7 +620,7 @@
6  
7         hashp = (HTAB *)dbp->internal;
8         if (flag) {
9 -               hashp->errno = errno = EINVAL;
10 +               hashp->err_no = errno = EINVAL;
11                 return (ERROR);
12         }
13         return (hash_access(hashp, HASH_GET, (DBT *)key, data));
14 @@ -637,11 +637,11 @@
15  
16         hashp = (HTAB *)dbp->internal;
17         if (flag && flag != R_NOOVERWRITE) {
18 -               hashp->errno = errno = EINVAL;
19 +               hashp->err_no = errno = EINVAL;
20                 return (ERROR);
21         }
22         if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
23 -               hashp->errno = errno = EPERM;
24 +               hashp->err_no = errno = EPERM;
25                 return (ERROR);
26         }
27         return (hash_access(hashp, flag == R_NOOVERWRITE ?
28 @@ -658,11 +658,11 @@
29  
30         hashp = (HTAB *)dbp->internal;
31         if (flag) {
32 -               hashp->errno = errno = EINVAL;
33 +               hashp->err_no = errno = EINVAL;
34                 return (ERROR);
35         }
36         if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
37 -               hashp->errno = errno = EPERM;
38 +               hashp->err_no = errno = EPERM;
39                 return (ERROR);
40         }
41  
42 @@ -837,7 +837,7 @@
43         hashp = (HTAB *)dbp->internal;
44  
45         if (flags && flags != R_FIRST && flags != R_NEXT) {
46 -               hashp->errno = errno = EINVAL;
47 +               hashp->err_no = errno = EINVAL;
48                 return (ERROR);
49         }
50  #ifdef HASH_STATISTICS