Changeset 277 for trunk/src/emx/bsd
- Timestamp:
- Jun 2, 2003, 9:56:50 PM (22 years ago)
- Location:
- trunk/src/emx/bsd/db
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/bsd/db/hash/hash.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r276 r277 519 519 if (wsize != sizeof(HASHHDR)) { 520 520 errno = EFTYPE; 521 hashp-> errno = errno;521 hashp->dbmerrno = errno; /* bird: errno */ 522 522 return (-1); 523 523 } … … 550 550 hashp = (HTAB *)dbp->internal; 551 551 if (flag) { 552 hashp-> errno = errno = EINVAL;552 hashp->dbmerrno = errno = EINVAL; /* bird: errno */ 553 553 return (ERROR); 554 554 } … … 567 567 hashp = (HTAB *)dbp->internal; 568 568 if (flag && flag != R_NOOVERWRITE) { 569 hashp-> errno = errno = EINVAL;569 hashp->dbmerrno = errno = EINVAL; /* bird: errno */ 570 570 return (ERROR); 571 571 } 572 572 if ((hashp->flags & O_ACCMODE) == O_RDONLY) { 573 hashp-> errno = errno = EPERM;573 hashp->dbmerrno = errno = EPERM; /* bird: errno */ 574 574 return (ERROR); 575 575 } … … 588 588 hashp = (HTAB *)dbp->internal; 589 589 if (flag && flag != R_CURSOR) { 590 hashp-> errno = errno = EINVAL;590 hashp->dbmerrno = errno = EINVAL; /* bird: errno */ 591 591 return (ERROR); 592 592 } 593 593 if ((hashp->flags & O_ACCMODE) == O_RDONLY) { 594 hashp-> errno = errno = EPERM;594 hashp->dbmerrno = errno = EPERM; /* bird: errno */ 595 595 return (ERROR); 596 596 } … … 743 743 hashp = (HTAB *)dbp->internal; 744 744 if (flag && flag != R_FIRST && flag != R_NEXT) { 745 hashp-> errno = errno = EINVAL;745 hashp->dbmerrno = errno = EINVAL; /* bird: errno */ 746 746 return (ERROR); 747 747 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/bsd/db/hash/hash.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r276 r277 72 72 int ssize; /* Segment Size */ 73 73 int sshift; /* Segment shift */ 74 int ovfl_point; /* Where overflow pages are being 74 int ovfl_point; /* Where overflow pages are being 75 75 * allocated */ 76 76 int last_freed; /* Last overflow page freed */ 77 77 int max_bucket; /* ID of Maximum bucket in use */ 78 78 int high_mask; /* Mask to modulo into entire table */ 79 int low_mask; /* Mask to modulo into lower half of 79 int low_mask; /* Mask to modulo into lower half of 80 80 * table */ 81 81 int ffactor; /* Fill factor */ … … 83 83 int hdrpages; /* Size of table header */ 84 84 int h_charkey; /* value of hash(CHARKEY) */ 85 #define NCACHED 32 /* number of bit maps and spare 85 #define NCACHED 32 /* number of bit maps and spare 86 86 * points */ 87 87 int spares[NCACHED];/* spare pages for overflow */ 88 u_int16_t bitmaps[NCACHED]; /* address of overflow page 88 u_int16_t bitmaps[NCACHED]; /* address of overflow page 89 89 * bitmaps */ 90 90 } HASHHDR; … … 93 93 HASHHDR hdr; /* Header */ 94 94 int nsegs; /* Number of allocated segments */ 95 int exsegs; /* Number of extra allocated 95 int exsegs; /* Number of extra allocated 96 96 * segments */ 97 97 u_int32_t /* Hash function */ … … 104 104 int cbucket; /* Current bucket */ 105 105 int cndx; /* Index of next item on cpage */ 106 int errno; /* Error Number -- for DBM 106 /* bird: this used to be errno but that crashes with the errno define in errno.h and stdlib.h. */ 107 int dbmerrno; /* Error Number -- for DBM 107 108 * compatability */ 108 int new_file; /* Indicates if fd is backing store 109 int new_file; /* Indicates if fd is backing store 109 110 * or no */ 110 int save_file; /* Indicates whether we need to flush 111 int save_file; /* Indicates whether we need to flush 111 112 * file at 112 113 * exit */ 113 114 u_int32_t *mapp[NCACHED]; /* Pointers to page maps */ 114 115 int nmaps; /* Initial number of bitmaps */ 115 int nbufs; /* Number of buffers left to 116 int nbufs; /* Number of buffers left to 116 117 * allocate */ 117 118 BUFHEAD bufhead; /* Header of buffer lru list */ … … 233 234 * OVFLPAGE -- 0 234 235 * 235 * FULL_KEY_DATA 236 * FULL_KEY_DATA 236 237 * This must be the first key/data pair on the page. 237 238 * There are two cases: -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/bsd/db/hash/hash_page.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r276 r277 58 58 #ifdef __EMX__ 59 59 #include <sys/param.h> 60 #include <io.h> 60 61 #endif /* __EMX__ */ 61 62 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/bsd/db/hash/ndbm.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r276 r277 181 181 182 182 hp = (HTAB *)db->internal; 183 return (hp-> errno);183 return (hp->dbmerrno); /* bird: errno */ 184 184 } 185 185 … … 191 191 192 192 hp = (HTAB *)db->internal; 193 hp-> errno = 0;193 hp->dbmerrno = 0; /* bird: errno */ 194 194 return (0); 195 195 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/bsd/db/recno/rec_close.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r276 r277 44 44 #include <stdio.h> 45 45 #include <unistd.h> 46 #ifdef __EMX__ 47 #include <io.h> 48 #endif 46 49 47 50 #include <db.h> -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.