2 * Sherlock -- Configuration-Dependent Definitions
4 * (c) 1997--2002 Martin Mares <mj@ucw.cz>
7 #ifndef _SHERLOCK_CONFIG_H
8 #define _SHERLOCK_CONFIG_H
10 /* Configuration switches */
12 #include "lib/autoconf.h"
16 #define SHER_VER "2.2a" SHER_SUFFIX
20 #define DEFAULT_CONFIG "cf/sherlock"
24 typedef unsigned char byte; /* exactly 8 bits, unsigned */
25 typedef signed char sbyte; /* exactly 8 bits, signed */
26 typedef unsigned short word; /* exactly 16 bits, unsigned */
27 typedef short sword; /* exactly 16 bits, signed */
28 typedef unsigned short u16; /* exactly 16 bits, unsigned */
29 typedef short s16; /* exactly 16 bits, signed */
30 typedef unsigned int u32; /* exactly 32 bits, unsigned */
31 typedef int s32; /* exactly 32 bits, signed */
32 typedef unsigned int uns; /* at least 32 bits */
33 typedef unsigned long long int u64; /* exactly 64 bits, unsigned */
34 typedef long long int s64; /* exactly 64 bits, signed */
35 typedef unsigned long addr_int_t; /* Both integer and address */
36 typedef unsigned int sh_time_t; /* Timestamp */
39 #define NULL (void *)0
42 typedef u32 oid_t; /* Object ID */
46 #include "lib/custom.h"
48 /* Data types and functions for accessing file positions */
50 #ifdef SHERLOCK_CONFIG_LARGE_DB
54 #define bgeto(f) bget5(f)
55 #define bputo(f,l) bput5(f,l)
56 #define bgetp(f) bgetq(f)
57 #define bputp(f,l) bputq(f,l)
58 #define GET_O(p) GET_U40(p)
59 #define GET_P(p) GET_U64(p)
60 #define PUT_O(p,x) PUT_U40(p,x)
61 #define PUT_P(p,x) PUT_U64(p,x)
66 #define bgeto(f) bgetl(f)
67 #define bputo(f,l) bputl(f,l)
68 #define bgetp(f) bgetl(f)
69 #define bputp(f,l) bputl(f,l)
70 #define GET_O(p) GET_U32(p)
71 #define GET_P(p) GET_U32(p)
72 #define PUT_O(p,x) PUT_U32(p,x)
73 #define PUT_P(p,x) PUT_U32(p,x)
81 #define NONRET __attribute__((noreturn))
82 #define UNUSED __attribute__((unused))
83 #define CONSTRUCTOR __attribute__((constructor))
84 #define PACKED __attribute__((packed))
85 #define CONST __attribute__((const))
88 #error This program requires the GNU C compiler.