X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fshort_types%2Fshort_types.h;fp=ccan%2Fshort_types%2Fshort_types.h;h=e34efe0eaa696b860fe6c339a51ab1e3289b7dc7;hp=0000000000000000000000000000000000000000;hb=3d937beb970d5b52bdaaf41d75e7a0b8eb89d472;hpb=4e5111fb40e1882b8108d61277d3e506cb958124 diff --git a/ccan/short_types/short_types.h b/ccan/short_types/short_types.h new file mode 100644 index 00000000..e34efe0e --- /dev/null +++ b/ccan/short_types/short_types.h @@ -0,0 +1,31 @@ +#ifndef CCAN_SHORT_TYPES_H +#define CCAN_SHORT_TYPES_H +#include + +/** + * u64/s64/u32/s32/u16/s16/u8/s8 - short names for explicitly-sized types. + */ +typedef uint64_t u64; +typedef int64_t s64; +typedef uint32_t u32; +typedef int32_t s32; +typedef uint16_t u16; +typedef int16_t s16; +typedef uint8_t u8; +typedef int8_t s8; + +/** + * be64/be32/be16 - 64/32/16 bit big-endian representation. + */ +typedef uint64_t be64; +typedef uint32_t be32; +typedef uint16_t be16; + +/** + * le64/le32/le16 - 64/32/16 bit little-endian representation. + */ +typedef uint64_t le64; +typedef uint32_t le32; +typedef uint16_t le16; + +#endif /* CCAN_SHORT_TYPES_H */