2 * Sherlock -- Configuration-Dependent Definitions
4 * (c) 1997--2002 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"
19 #define SHER_VER "2.2" SHERLOCK_VERSION_SUFFIX
23 #define DEFAULT_CONFIG "cf/sherlock"
27 typedef unsigned char byte; /* exactly 8 bits, unsigned */
28 typedef signed char sbyte; /* exactly 8 bits, signed */
29 typedef unsigned short word; /* exactly 16 bits, unsigned */
30 typedef short sword; /* exactly 16 bits, signed */
31 typedef unsigned short u16; /* exactly 16 bits, unsigned */
32 typedef short s16; /* exactly 16 bits, signed */
33 typedef unsigned int u32; /* exactly 32 bits, unsigned */
34 typedef int s32; /* exactly 32 bits, signed */
35 typedef unsigned int uns; /* at least 32 bits */
36 typedef unsigned long long int u64; /* exactly 64 bits, unsigned */
37 typedef long long int s64; /* exactly 64 bits, signed */
38 typedef unsigned long addr_int_t; /* Both integer and address */
39 typedef unsigned int sh_time_t; /* Timestamp */
42 #define NULL (void *)0
45 typedef u32 oid_t; /* Object ID */
47 /* Data types and functions for accessing file positions */
49 #ifdef SHERLOCK_CONFIG_LARGE_DB
53 #define bgeto(f) bget5(f)
54 #define bputo(f,l) bput5(f,l)
55 #define bgetp(f) bgetq(f)
56 #define bputp(f,l) bputq(f,l)
57 #define GET_O(p) GET_U40(p)
58 #define GET_P(p) GET_U64(p)
59 #define PUT_O(p,x) PUT_U40(p,x)
60 #define PUT_P(p,x) PUT_U64(p,x)
65 #define bgeto(f) bgetl(f)
66 #define bputo(f,l) bputl(f,l)
67 #define bgetp(f) bgetl(f)
68 #define bputp(f,l) bputl(f,l)
69 #define GET_O(p) GET_U32(p)
70 #define GET_P(p) GET_U32(p)
71 #define PUT_O(p,x) PUT_U32(p,x)
72 #define PUT_P(p,x) PUT_U32(p,x)
80 #define NONRET __attribute__((noreturn))
81 #define UNUSED __attribute__((unused))
82 #define CONSTRUCTOR __attribute__((constructor))
83 #define PACKED __attribute__((packed))
84 #define CONST __attribute__((const))
87 #error This program requires the GNU C compiler.