Added tizen packaging
[platform/upstream/libdb.git] / packaging / db-1.85-errno.patch
1 glibc doesn't like errno as the name of a field.
2 --- db.1.85/hash/hash.h Mon Feb 18 19:12:14 2002
3 +++ db.1.85/hash/hash.h Mon Feb 18 19:12:20 2002
4 @@ -103,7 +103,7 @@
5         BUFHEAD         *cpage;         /* Current page */
6         int             cbucket;        /* Current bucket */
7         int             cndx;           /* Index of next item on cpage */
8 -       int             errno;          /* Error Number -- for DBM 
9 +       int             err;            /* Error Number -- for DBM 
10                                          * compatability */
11         int             new_file;       /* Indicates if fd is backing store 
12                                          * or no */
13 --- db.1.85/hash/hash.c Mon Feb 18 19:12:24 2002
14 +++ db.1.85/hash/hash.c Mon Feb 18 19:12:44 2002
15 @@ -505,7 +505,7 @@
16         else
17                 if (wsize != sizeof(HASHHDR)) {
18                         errno = EFTYPE;
19 -                       hashp->errno = errno;
20 +                       hashp->err = errno;
21                         return (-1);
22                 }
23         for (i = 0; i < NCACHED; i++)
24 @@ -536,7 +536,7 @@
25  
26         hashp = (HTAB *)dbp->internal;
27         if (flag) {
28 -               hashp->errno = errno = EINVAL;
29 +               hashp->err = errno = EINVAL;
30                 return (ERROR);
31         }
32         return (hash_access(hashp, HASH_GET, (DBT *)key, data));
33 @@ -553,11 +553,11 @@
34  
35         hashp = (HTAB *)dbp->internal;
36         if (flag && flag != R_NOOVERWRITE) {
37 -               hashp->errno = errno = EINVAL;
38 +               hashp->err = errno = EINVAL;
39                 return (ERROR);
40         }
41         if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
42 -               hashp->errno = errno = EPERM;
43 +               hashp->err = errno = EPERM;
44                 return (ERROR);
45         }
46         return (hash_access(hashp, flag == R_NOOVERWRITE ?
47 @@ -574,11 +574,11 @@
48  
49         hashp = (HTAB *)dbp->internal;
50         if (flag && flag != R_CURSOR) {
51 -               hashp->errno = errno = EINVAL;
52 +               hashp->err = errno = EINVAL;
53                 return (ERROR);
54         }
55         if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
56 -               hashp->errno = errno = EPERM;
57 +               hashp->err = errno = EPERM;
58                 return (ERROR);
59         }
60         return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL));
61 @@ -729,7 +729,7 @@
62  
63         hashp = (HTAB *)dbp->internal;
64         if (flag && flag != R_FIRST && flag != R_NEXT) {
65 -               hashp->errno = errno = EINVAL;
66 +               hashp->err = errno = EINVAL;
67                 return (ERROR);
68         }
69  #ifdef HASH_STATISTICS
70 --- db.1.85/hash/ndbm.c Mon Feb 18 19:12:58 2002
71 +++ db.1.85/hash/ndbm.c Mon Feb 18 19:13:05 2002
72 @@ -180,7 +180,7 @@
73         HTAB *hp;
74  
75         hp = (HTAB *)db->internal;
76 -       return (hp->errno);
77 +       return (hp->err);
78  }
79  
80  extern int
81 @@ -190,7 +190,7 @@
82         HTAB *hp;
83  
84         hp = (HTAB *)db->internal;
85 -       hp->errno = 0;
86 +       hp->err = 0;
87         return (0);
88  }
89