initial checkin of new hdw-linux development cvs repository
[hdw-linux/hdw-linux.git] / packages / base / nvi / errno.patch
1 --- ./ex/tag.h.orig     1995-01-31 18:59:16.000000000 +0100
2 +++ ./ex/tag.h  2002-10-12 16:45:16.000000000 +0200
3 @@ -38,7 +38,7 @@
4  struct _tagf {                         /* Tag file. */
5         TAILQ_ENTRY(_tagf) q;           /* Linked list of tag files. */
6         char    *name;                  /* Tag file name. */
7 -       int      errno;                 /* Error. */
8 +       int      errnum;                /* Error. */
9  
10  #define        TAGF_ERR        0x01            /* Error occurred. */
11  #define        TAGF_ERR_WARN   0x02            /* Error reported. */
12 --- ./ex/ex_tag.c.orig  2002-10-12 16:46:54.000000000 +0200
13 +++ ./ex/ex_tag.c       2002-10-12 16:47:21.000000000 +0200
14 @@ -727,7 +727,7 @@
15                                 if (F_ISSET(tfp, TAGF_ERR) &&
16                                     !F_ISSET(tfp, TAGF_ERR_WARN)) {
17                                         p = msg_print(sp, tfp->name, &nf1);
18 -                                       errno = tfp->errno;
19 +                                       errno = tfp->errnum;
20                                         msgq(sp, M_SYSERR, "%s", p);
21                                         if (nf1)
22                                                 FREE_SPACE(sp, p, 0);
23 @@ -815,7 +815,7 @@
24         char *endp, *back, *front, *map, *p;
25  
26         if ((fd = open(tfp->name, O_RDONLY, 0)) < 0) {
27 -               tfp->errno = errno;
28 +               tfp->errnum = errno;
29                 return (1);
30         }
31  
32 @@ -830,7 +830,7 @@
33          */
34         if (fstat(fd, &sb) || (map = mmap(NULL, (size_t)sb.st_size,
35             PROT_READ, MAP_PRIVATE, fd, (off_t)0)) == (caddr_t)-1) {
36 -               tfp->errno = errno;
37 +               tfp->errnum = errno;
38                 (void)close(fd);
39                 return (1);
40         }
41 --- ./PORT/db.1.85/hash/hash.h.orig     1994-06-24 17:12:29.000000000 +0200
42 +++ ./PORT/db.1.85/hash/hash.h  2002-10-12 16:41:21.000000000 +0200
43 @@ -103,7 +103,7 @@
44         BUFHEAD         *cpage;         /* Current page */
45         int             cbucket;        /* Current bucket */
46         int             cndx;           /* Index of next item on cpage */
47 -       int             errno;          /* Error Number -- for DBM 
48 +       int             errnum;         /* Error Number -- for DBM 
49                                          * compatability */
50         int             new_file;       /* Indicates if fd is backing store 
51                                          * or no */
52 --- ./PORT/db.1.85/hash/hash.c.orig     2002-10-12 16:27:14.000000000 +0200
53 +++ ./PORT/db.1.85/hash/hash.c  2002-10-12 16:42:30.000000000 +0200
54 @@ -505,7 +505,7 @@
55         else
56                 if (wsize != sizeof(HASHHDR)) {
57                         errno = EFTYPE;
58 -                       hashp->errno = errno;
59 +                       hashp->errnum = errno;
60                         return (-1);
61                 }
62         for (i = 0; i < NCACHED; i++)
63 @@ -536,7 +536,7 @@
64  
65         hashp = (HTAB *)dbp->internal;
66         if (flag) {
67 -               hashp->errno = errno = EINVAL;
68 +               hashp->errnum = errno = EINVAL;
69                 return (ERROR);
70         }
71         return (hash_access(hashp, HASH_GET, (DBT *)key, data));
72 @@ -553,11 +553,11 @@
73  
74         hashp = (HTAB *)dbp->internal;
75         if (flag && flag != R_NOOVERWRITE) {
76 -               hashp->errno = errno = EINVAL;
77 +               hashp->errnum = errno = EINVAL;
78                 return (ERROR);
79         }
80         if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
81 -               hashp->errno = errno = EPERM;
82 +               hashp->errnum = errno = EPERM;
83                 return (ERROR);
84         }
85         return (hash_access(hashp, flag == R_NOOVERWRITE ?
86 @@ -574,11 +574,11 @@
87  
88         hashp = (HTAB *)dbp->internal;
89         if (flag && flag != R_CURSOR) {
90 -               hashp->errno = errno = EINVAL;
91 +               hashp->errnum = errno = EINVAL;
92                 return (ERROR);
93         }
94         if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
95 -               hashp->errno = errno = EPERM;
96 +               hashp->errnum = errno = EPERM;
97                 return (ERROR);
98         }
99         return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL));
100 @@ -729,7 +729,7 @@
101  
102         hashp = (HTAB *)dbp->internal;
103         if (flag && flag != R_FIRST && flag != R_NEXT) {
104 -               hashp->errno = errno = EINVAL;
105 +               hashp->errnum = errno = EINVAL;
106                 return (ERROR);
107         }
108  #ifdef HASH_STATISTICS
109 --- ./PORT/db.1.85/hash/ndbm.c.orig     2002-10-12 19:48:03.000000000 +0200
110 +++ ./PORT/db.1.85/hash/ndbm.c  2002-10-12 19:48:23.000000000 +0200
111 @@ -180,7 +180,7 @@
112         HTAB *hp;
113  
114         hp = (HTAB *)db->internal;
115 -       return (hp->errno);
116 +       return (hp->errnum);
117  }
118  
119  extern int
120 @@ -190,7 +190,7 @@
121         HTAB *hp;
122  
123         hp = (HTAB *)db->internal;
124 -       hp->errno = 0;
125 +       hp->errnum = 0;
126         return (0);
127  }
128