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 /* Custom configuration */
12 #include "lib/custom.h"
16 #define SHER_VER "2.2a" SHER_SUFFIX
18 /* CPU characteristics */
21 #define CPU_LITTLE_ENDIAN
23 #define CPU_ALLOW_UNALIGNED
24 #define CPU_STRUCT_ALIGN 4
25 #undef CPU_64BIT_POINTERS
27 /* OS characteristics */
33 #define DEFAULT_CONFIG "cf/sherlock"
37 typedef unsigned char byte; /* exactly 8 bits, unsigned */
38 typedef signed char sbyte; /* exactly 8 bits, signed */
39 typedef unsigned short word; /* exactly 16 bits, unsigned */
40 typedef short sword; /* exactly 16 bits, signed */
41 typedef unsigned short u16; /* exactly 16 bits, unsigned */
42 typedef short s16; /* exactly 16 bits, signed */
43 typedef unsigned int u32; /* exactly 32 bits, unsigned */
44 typedef int s32; /* exactly 32 bits, signed */
45 typedef unsigned int uns; /* at least 32 bits */
46 typedef unsigned long long int u64; /* exactly 64 bits, unsigned */
47 typedef long long int s64; /* exactly 64 bits, signed */
48 typedef unsigned long addr_int_t; /* Both integer and address */
49 typedef unsigned int sh_time_t; /* Timestamp */
52 #define NULL (void *)0
55 typedef u32 oid_t; /* Object ID */
57 /* Data types and functions for accessing file positions */
59 #ifdef SHERLOCK_CONFIG_LARGE_DB
63 #define bgeto(f) bget5(f)
64 #define bputo(f,l) bput5(f,l)
65 #define bgetp(f) bgetq(f)
66 #define bputp(f,l) bputq(f,l)
67 #define GET_O(p) GET_U40(p)
68 #define GET_P(p) GET_U64(p)
73 #define bgeto(f) bgetl(f)
74 #define bputo(f,l) bputl(f,l)
75 #define bgetp(f) bgetl(f)
76 #define bputp(f,l) bputl(f,l)
77 #define GET_O(p) GET_U32(p)
78 #define GET_P(p) GET_U32(p)
86 #define NONRET __attribute__((noreturn))
87 #define UNUSED __attribute__((unused))
88 #define CONSTRUCTOR __attribute__((constructor))
89 #define PACKED __attribute__((packed))
92 #error This program requires the GNU C compiler.