2 * Sherlock Library -- Configuration-Dependent Definitions
4 * (c) 1997--2000 Martin Mares <mj@ucw.cz>
7 #ifndef _SHERLOCK_CONFIG_H
8 #define _SHERLOCK_CONFIG_H
12 #define SHER_VER "2.0"
16 #define SHERLOCK_CONFIG_LARGE_DB /* Support for DB files >4GB */
17 #define SHERLOCK_CONFIG_LFS /* Large files on 32-bit systems */
18 #define SHERLOCK_CONFIG_LFS_LIBC /* LFS supported directly by libc */
20 /* CPU characteristics */
22 #define CPU_LITTLE_ENDIAN
24 #define CPU_ALLOW_UNALIGNED
25 #define CPU_STRUCT_ALIGN 4
29 #define DEFAULT_CONFIG "cf/sherlock"
33 typedef unsigned char byte; /* exactly 8 bits, unsigned */
34 typedef signed char sbyte; /* exactly 8 bits, signed */
35 typedef unsigned short word; /* exactly 16 bits, unsigned */
36 typedef short sword; /* exactly 16 bits, signed */
37 typedef unsigned short u16; /* exactly 16 bits, unsigned */
38 typedef short s16; /* exactly 16 bits, signed */
39 typedef unsigned int u32; /* exactly 32 bits, unsigned */
40 typedef int s32; /* exactly 32 bits, signed */
41 typedef unsigned int uns; /* at least 32 bits */
42 typedef unsigned long long int u64; /* exactly 64 bits, unsigned */
43 typedef long long int s64; /* exactly 64 bits, signed */
44 typedef unsigned long addr_int_t; /* Both integer and address */
45 typedef unsigned int sh_time_t; /* Timestamp */
48 #define NULL (void *)0
51 typedef u32 oid_t; /* Object ID */
53 /* Data types and functions for accessing file positions */
55 #ifdef SHERLOCK_CONFIG_LARGE_DB
59 #define bgeto(f) bget5(f)
60 #define bputo(f,l) bput5(f,l)
61 #define bgetp(f) bgetq(f)
62 #define bputp(f,l) bputq(f,l)
63 #define GET_O(p) GET_U40(p)
64 #define GET_P(p) GET_U64(p)
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)
82 #define NONRET __attribute__((noreturn))
83 #define UNUSED __attribute__((unused))
84 #define CONSTRUCTOR __attribute__((constructor))
85 #define PACKED __attribute__((packed))
88 #error This program requires the GNU C compiler.