]> mj.ucw.cz Git - libucw.git/blob - lib/config.h
66fffa98156a14d945240f42a7ee8b9a0b55a971
[libucw.git] / lib / config.h
1 /*
2  *      Sherlock Library -- Configuration-Dependent Definitions
3  *
4  *      (c) 1997, 1998 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
5  */
6
7 #ifndef _SHERLOCK_CONFIG_H
8 #define _SHERLOCK_CONFIG_H
9
10 /* Version */
11
12 #define SHER_VER "1.1"
13
14 /* Types */
15
16 typedef unsigned char byte;             /* exactly 8 bits, unsigned */
17 typedef signed char sbyte;              /* exactly 8 bits, signed */
18 typedef unsigned short word;            /* exactly 16 bits, unsigned */
19 typedef short sword;                    /* exactly 16 bits, signed */
20 typedef unsigned short u16;             /* exactly 16 bits, unsigned */
21 typedef short s16;                      /* exactly 16 bits, signed */
22 typedef unsigned int ulg;               /* exactly 32 bits, unsigned */
23 typedef int slg;                        /* exactly 32 bits, signed */
24 typedef unsigned int u32;               /* exactly 32 bits, unsigned */
25 typedef int s32;                        /* exactly 32 bits, signed */
26 typedef unsigned int uns;               /* at least 32 bits */
27 typedef unsigned long long int u64;     /* exactly 64 bits, unsigned */
28 typedef long long int s64;              /* exactly 64 bits, signed */
29 typedef unsigned long addr_int_t;       /* Both integer and address */
30
31 #ifndef NULL
32 #define NULL (void *)0
33 #endif
34
35 /* CPU characteristics */
36
37 #define CPU_LITTLE_ENDIAN
38 #undef CPU_BIG_ENDIAN
39 #define CPU_CAN_DO_UNALIGNED_WORDS
40 #define CPU_CAN_DO_UNALIGNED_LONGS
41 #define CPU_STRUCT_ALIGN 4
42
43 /* Misc */
44
45 #ifdef __GNUC__
46
47 #undef inline
48 #define NONRET __attribute__((noreturn))
49
50 #else
51
52 #define inline
53 #define NONRET
54
55 #endif
56
57 #endif