]> git.ozlabs.org Git - ccan/blob - ccan/short_types/short_types.h
tal: allow notifiers on NULL.
[ccan] / ccan / short_types / short_types.h
1 /* CC0 (Public domain) - see LICENSE file for details */
2 #ifndef CCAN_SHORT_TYPES_H
3 #define CCAN_SHORT_TYPES_H
4 #include <stdint.h>
5
6 /**
7  * u64/s64/u32/s32/u16/s16/u8/s8 - short names for explicitly-sized types.
8  */
9 typedef uint64_t u64;
10 typedef int64_t s64;
11 typedef uint32_t u32;
12 typedef int32_t s32;
13 typedef uint16_t u16;
14 typedef int16_t s16;
15 typedef uint8_t u8;
16 typedef int8_t s8;
17
18 /* Whichever they include first, they get these definitions. */
19 #ifdef CCAN_ENDIAN_H
20 /**
21  * be64/be32/be16 - 64/32/16 bit big-endian representation.
22  */
23 typedef beint64_t be64;
24 typedef beint32_t be32;
25 typedef beint16_t be16;
26
27 /**
28  * le64/le32/le16 - 64/32/16 bit little-endian representation.
29  */
30 typedef leint64_t le64;
31 typedef leint32_t le32;
32 typedef leint16_t le16;
33 #endif
34
35 #endif /* CCAN_SHORT_TYPES_H */