/*
----------------------------------------------------------------------
machine/target porting options
----------------------------------------------------------------------

         +----------------------------------------------------+
         |  Worldwide Copyright (c) Byte Designs Ltd (2001)   |    
         |                                                    |
         |               20568 - 32 Avenue                    |
         |               LANGLEY, BC                          |
         |               V3A 4P5 CANADA                       |
         |                                                    |
         |            Sales: sales@bytedesigns.com            |
         |          Support: support@bytedesigns.com          |
         | Phone: (604) 534 0722      Fax: (604) 534 2601     |
         +----------------------------------------------------+
                            Version 6.12
 
----------------------------------------------------------------------
*/

/* locking offsets ----------------------------------------------- */

#if( ISLOCKING == 1 )                    /* old style table locks */
# define ISLKFILEOFF     0x40000000L     /* offset of file claim table */
# define ISLKBUSYOFF     0x3FF00000L     /* offset of I/O lock table */
# define ISLKBUSYLEN     0x100000L       /* lengths of the above */
# define ISLKDATAOFF     0x40000000L     /* offset of data lock table */
# define ISLKDATALEN     0xFFFFFFFL      /* length of the above */
#endif

#if( ISLOCKING == 2 )                    /* new style read/write */
# if( C7LOCKING == 1 || C7LOCKING == 2 )
#   define ISLKFILEOFF     0x7FFFFFFFL   /* offset of file claim table */
# else
#   define ISLKFILEOFF     0x40000000L   /* offset of file claim table */
# endif
# define ISLKBUSYOFF     0x0L            /* offset of I/O lock table */
# define ISLKBUSYLEN     0x3FFFFFFFL     /* lengths of the above */
# define ISLKDATAOFF     0x40000000L     /* offset of data lock table */
# define ISLKDATALEN     0x3FFFFFFFL     /* length of the above */
#endif

#if( ISLOCKING == 3 )                    /* third file method */
# define ISLKFILEOFF     0x00000000L     /* offset of file claim table */
# define ISLKBUSYOFF     0x20000000L     /* offset of I/O lock table */
# define ISLKBUSYLEN     0x20000000L	 /* lengths of the above */
# define ISLKDATAOFF     0x40000000L     /* offset of data lock table */
# define ISLKDATALEN     0x40000000L     /* length of the the above */
#endif

/* locking configuration ----------------------------------------- */

#if( ISLOCKING == 1 || ISLOCKING == 3 )
# include <unistd.h>
# if( ISHUGE == 1 )
#  define ISLKCALL        lockf64         /* unix locking call */
# else
#  define ISLKCALL        lockf           /* unix locking call */
# endif
# define ISLKSET         F_LOCK          /* wait for and set lock */
# define ISLKTRY         F_TLOCK         /* attempt lock or fail */
# define ISUNLCK         F_ULOCK         /* release lock */
#endif

/* memory handling ----------------------------------------------- */

#if( ISBERKELY )
# define ISMEMMOVE(D,S,L)   bcopy(S,D,L)
# define ISMEMCOPY(D,S,L)   bcopy(S,D,L)
# define ISMEMCMP(D,S,L)    bcmp(S,D,L)
# define ISMEMSET(D,V,L)    is_memset((char*)D,V,L)
#else
# define ISMEMMOVE(D,S,L)   memmove(D,S,L)
# define ISMEMCOPY(D,S,L)   memcpy(D,S,L)
# define ISMEMCMP(D,S,L)    memcmp(D,S,L)
# define ISMEMSET(D,V,L)    memset(D,V,L)
#endif

/* auto repair handling ------------------------------------------- */

#if( ISREPAIR )
#define reppath		    "/tmp/isamrep"     /* where to put repair files */
#endif
