2 * Sherlock -- Configuration-Dependent Definitions
4 * (c) 1997--2001 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.0" SHER_SUFFIX
18 /* CPU characteristics */
20 #define CPU_LITTLE_ENDIAN
22 #define CPU_ALLOW_UNALIGNED
23 #define CPU_STRUCT_ALIGN 4
24 #undef CPU_64BIT_POINTERS
28 #define DEFAULT_CONFIG "cf/sherlock"
32 typedef unsigned char byte; /* exactly 8 bits, unsigned */
33 typedef signed char sbyte; /* exactly 8 bits, signed */
34 typedef unsigned short word; /* exactly 16 bits, unsigned */
35 typedef short sword; /* exactly 16 bits, signed */
36 typedef unsigned short u16; /* exactly 16 bits, unsigned */
37 typedef short s16; /* exactly 16 bits, signed */
38 typedef unsigned int u32; /* exactly 32 bits, unsigned */
39 typedef int s32; /* exactly 32 bits, signed */
40 typedef unsigned int uns; /* at least 32 bits */
41 typedef unsigned long long int u64; /* exactly 64 bits, unsigned */
42 typedef long long int s64; /* exactly 64 bits, signed */
43 typedef unsigned long addr_int_t; /* Both integer and address */
44 typedef unsigned int sh_time_t; /* Timestamp */
47 #define NULL (void *)0
50 typedef u32 oid_t; /* Object ID */
52 /* Data types and functions for accessing file positions */
54 #ifdef SHERLOCK_CONFIG_LARGE_DB
58 #define bgeto(f) bget5(f)
59 #define bputo(f,l) bput5(f,l)
60 #define bgetp(f) bgetq(f)
61 #define bputp(f,l) bputq(f,l)
62 #define GET_O(p) GET_U40(p)
63 #define GET_P(p) GET_U64(p)
68 #define bgeto(f) bgetl(f)
69 #define bputo(f,l) bputl(f,l)
70 #define bgetp(f) bgetl(f)
71 #define bputp(f,l) bputl(f,l)
72 #define GET_O(p) GET_U32(p)
73 #define GET_P(p) GET_U32(p)
81 #define NONRET __attribute__((noreturn))
82 #define UNUSED __attribute__((unused))
83 #define CONSTRUCTOR __attribute__((constructor))
84 #define PACKED __attribute__((packed))
87 #error This program requires the GNU C compiler.