Changeset 277 for trunk/src/emx/bsd


Ignore:
Timestamp:
Jun 2, 2003, 9:56:50 PM (22 years ago)
Author:
bird
Message:

#357: Initial adjustments.

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 to 1.2
    r276 r277  
    519519                if (wsize != sizeof(HASHHDR)) {
    520520                        errno = EFTYPE;
    521                         hashp->errno = errno;
     521                        hashp->dbmerrno = errno; /* bird: errno */
    522522                        return (-1);
    523523                }
     
    550550        hashp = (HTAB *)dbp->internal;
    551551        if (flag) {
    552                 hashp->errno = errno = EINVAL;
     552                hashp->dbmerrno = errno = EINVAL;   /* bird: errno */
    553553                return (ERROR);
    554554        }
     
    567567        hashp = (HTAB *)dbp->internal;
    568568        if (flag && flag != R_NOOVERWRITE) {
    569                 hashp->errno = errno = EINVAL;
     569                hashp->dbmerrno = errno = EINVAL;   /* bird: errno */
    570570                return (ERROR);
    571571        }
    572572        if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
    573                 hashp->errno = errno = EPERM;
     573                hashp->dbmerrno = errno = EPERM;    /* bird: errno */
    574574                return (ERROR);
    575575        }
     
    588588        hashp = (HTAB *)dbp->internal;
    589589        if (flag && flag != R_CURSOR) {
    590                 hashp->errno = errno = EINVAL;
     590                hashp->dbmerrno = errno = EINVAL;   /* bird: errno */
    591591                return (ERROR);
    592592        }
    593593        if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
    594                 hashp->errno = errno = EPERM;
     594                hashp->dbmerrno = errno = EPERM;    /* bird: errno */
    595595                return (ERROR);
    596596        }
     
    743743        hashp = (HTAB *)dbp->internal;
    744744        if (flag && flag != R_FIRST && flag != R_NEXT) {
    745                 hashp->errno = errno = EINVAL;
     745                hashp->dbmerrno = errno = EINVAL;   /* bird: errno */
    746746                return (ERROR);
    747747        }
  • trunk/src/emx/bsd/db/hash/hash.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r276 r277  
    7272        int             ssize;          /* Segment Size */
    7373        int             sshift;         /* Segment shift */
    74         int             ovfl_point;     /* Where overflow pages are being 
     74        int             ovfl_point;     /* Where overflow pages are being
    7575                                         * allocated */
    7676        int             last_freed;     /* Last overflow page freed */
    7777        int             max_bucket;     /* ID of Maximum bucket in use */
    7878        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
    8080                                         * table */
    8181        int             ffactor;        /* Fill factor */
     
    8383        int             hdrpages;       /* Size of table header */
    8484        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
    8686                                         * points */
    8787        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
    8989                                                 * bitmaps */
    9090} HASHHDR;
     
    9393        HASHHDR         hdr;            /* Header */
    9494        int             nsegs;          /* Number of allocated segments */
    95         int             exsegs;         /* Number of extra allocated 
     95        int             exsegs;         /* Number of extra allocated
    9696                                         * segments */
    9797        u_int32_t                       /* Hash function */
     
    104104        int             cbucket;        /* Current bucket */
    105105        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
    107108                                         * compatability */
    108         int             new_file;       /* Indicates if fd is backing store 
     109        int             new_file;       /* Indicates if fd is backing store
    109110                                         * or no */
    110         int             save_file;      /* Indicates whether we need to flush 
     111        int             save_file;      /* Indicates whether we need to flush
    111112                                         * file at
    112113                                         * exit */
    113114        u_int32_t       *mapp[NCACHED]; /* Pointers to page maps */
    114115        int             nmaps;          /* Initial number of bitmaps */
    115         int             nbufs;          /* Number of buffers left to 
     116        int             nbufs;          /* Number of buffers left to
    116117                                         * allocate */
    117118        BUFHEAD         bufhead;        /* Header of buffer lru list */
     
    233234 *                  OVFLPAGE -- 0
    234235 *
    235  * FULL_KEY_DATA 
     236 * FULL_KEY_DATA
    236237 *              This must be the first key/data pair on the page.
    237238 *              There are two cases:
  • trunk/src/emx/bsd/db/hash/hash_page.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r276 r277  
    5858#ifdef __EMX__
    5959#include <sys/param.h>
     60#include <io.h>
    6061#endif /* __EMX__ */
    6162
  • trunk/src/emx/bsd/db/hash/ndbm.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r276 r277  
    181181
    182182        hp = (HTAB *)db->internal;
    183         return (hp->errno);
     183        return (hp->dbmerrno);          /* bird: errno */
    184184}
    185185
     
    191191
    192192        hp = (HTAB *)db->internal;
    193         hp->errno = 0;
     193        hp->dbmerrno = 0;               /* bird: errno */
    194194        return (0);
    195195}
  • trunk/src/emx/bsd/db/recno/rec_close.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r276 r277  
    4444#include <stdio.h>
    4545#include <unistd.h>
     46#ifdef __EMX__
     47#include <io.h>
     48#endif
    4649
    4750#include <db.h>
Note: See TracChangeset for help on using the changeset viewer.