2 * Sherlock -- Configuration-Dependent Definitions
4 * (c) 1997--2003 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
10 #ifndef _SHERLOCK_CONFIG_H
11 #define _SHERLOCK_CONFIG_H
13 /* Configuration switches */
15 #include "lib/autoconf.h"
17 #ifdef CONFIG_MAX_CONTEXTS
18 #define CONFIG_CONTEXTS
23 #define SHER_VER "3.0" SHERLOCK_VERSION_SUFFIX
27 #define DEFAULT_CONFIG "cf/sherlock"
31 typedef unsigned char byte; /* exactly 8 bits, unsigned */
32 typedef signed char sbyte; /* exactly 8 bits, signed */
33 typedef unsigned short word; /* exactly 16 bits, unsigned */
34 typedef short sword; /* exactly 16 bits, signed */
35 typedef unsigned short u16; /* exactly 16 bits, unsigned */
36 typedef short s16; /* exactly 16 bits, signed */
37 typedef unsigned int u32; /* exactly 32 bits, unsigned */
38 typedef int s32; /* exactly 32 bits, signed */
39 typedef unsigned int uns; /* at least 32 bits */
40 typedef unsigned long long int u64; /* exactly 64 bits, unsigned */
41 typedef long long int s64; /* exactly 64 bits, signed */
42 typedef unsigned long addr_int_t; /* Both integer and address */
43 typedef unsigned int sh_time_t; /* Timestamp */
46 #define NULL (void *)0
49 typedef u32 oid_t; /* Object ID */
51 /* Data types and functions for accessing file positions */
53 #ifdef CONFIG_LARGE_DB
57 #define bgeto(f) bget5(f)
58 #define bputo(f,l) bput5(f,l)
59 #define bgetp(f) bgetq(f)
60 #define bputp(f,l) bputq(f,l)
61 #define GET_O(p) GET_U40(p)
62 #define GET_P(p) GET_U64(p)
63 #define PUT_O(p,x) PUT_U40(p,x)
64 #define PUT_P(p,x) PUT_U64(p,x)
69 #define bgeto(f) bgetl(f)
70 #define bputo(f,l) bputl(f,l)
71 #define bgetp(f) bgetl(f)
72 #define bputp(f,l) bputl(f,l)
73 #define GET_O(p) GET_U32(p)
74 #define GET_P(p) GET_U32(p)
75 #define PUT_O(p,x) PUT_U32(p,x)
76 #define PUT_P(p,x) PUT_U32(p,x)
84 #define NONRET __attribute__((noreturn))
85 #define UNUSED __attribute__((unused))
86 #define CONSTRUCTOR __attribute__((constructor))
87 #define PACKED __attribute__((packed))
88 #define CONST __attribute__((const))
89 #define PURE __attribute__((const))
90 #define likely(x) __builtin_expect((x),1)
91 #define unlikely(x) __builtin_expect((x),0)
94 #error This program requires the GNU C compiler.