4 This file defines macros for 8, 16, and 32 bit integers. The macros are:
5 cit_int8_t default 8-bit int
6 cit_int16_t default 16-bit int
7 cit_int32_t default 32-bit int
8 cit_int64_t default 64-bit int (not implemented yet)
9 cit_sint8_t signed 8-bit int
10 cit_sint16_t signed 16-bit int
11 cit_sint32_t signed 32-bit int
12 cit_sint64_t signed 64-bit int (not implemented yet)
13 cit_uint8_t unsigned 8-bit int
14 cit_uint16_t unsigned 16-bit int
15 cit_uint32_t unsigned 32-bit int
16 cit_uint64_t unsigned 64-bit int (not implemented yet)
18 The sizes are determined during the configure process; see the
19 AC_CHECK_SIZEOF macros in configure.in. In no way do we assume that any
20 given datatype is any particular width, e.g. we don't assume char is one
21 byte; we check for it specifically.
23 This might seem excessively paranoid, but I've seen some WEIRD systems
24 and some bizarre compilers (Domain/OS for instance) in my time.
27 #ifndef _CITADEL_UX_TYPESIZE_H
28 #define _CITADEL_UX_TYPESIZE_H
30 /* Include sysdep.h if not already included */
37 # define cit_int8_t char
38 #elif SIZEOF_SHORT == 1
39 # define cit_int8_t short
41 # error Unable to find an 8-bit integer datatype
46 # define cit_int16_t short
48 # define cit_int16_t int
49 #elif SIZEOF_CHAR == 2
50 # define cit_int16_t char
52 # error Unable to find a 16-bit integer datatype
57 # define cit_int32_t int
58 #elif SIZEOF_SHORT == 4
59 # define cit_int32_t short
60 #elif SIZEOF_LONG == 4
61 # define cit_int32_t long
63 # error Unable to find a 32-bit integer datatype
67 #define cit_sint8_t signed cit_int8_t
68 #define cit_sint16_t signed cit_int16_t
69 #define cit_sint32_t signed cit_int32_t
72 #define cit_uint8_t unsigned cit_int8_t
73 #define cit_uint16_t unsigned cit_int16_t
74 #define cit_uint32_t unsigned cit_int32_t
76 #endif /* _CITADEL_UX_TYPESIZE_H */