X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fshort_types%2Fshort_types.h;h=175377e9bab9e6d624d08654de31ff4214169e37;hp=e34efe0eaa696b860fe6c339a51ab1e3289b7dc7;hb=4f09cf20ca00fe38b0702e0556bbad2341595ed0;hpb=ac0e87d7ecf790c187ce3c5d837b971fdd016b57 diff --git a/ccan/short_types/short_types.h b/ccan/short_types/short_types.h index e34efe0e..175377e9 100644 --- a/ccan/short_types/short_types.h +++ b/ccan/short_types/short_types.h @@ -1,3 +1,4 @@ +/* CC0 (Public domain) - see LICENSE file for details */ #ifndef CCAN_SHORT_TYPES_H #define CCAN_SHORT_TYPES_H #include @@ -14,18 +15,21 @@ typedef int16_t s16; typedef uint8_t u8; typedef int8_t s8; +/* Whichever they include first, they get these definitions. */ +#ifdef CCAN_ENDIAN_H /** * be64/be32/be16 - 64/32/16 bit big-endian representation. */ -typedef uint64_t be64; -typedef uint32_t be32; -typedef uint16_t be16; +typedef beint64_t be64; +typedef beint32_t be32; +typedef beint16_t be16; /** * le64/le32/le16 - 64/32/16 bit little-endian representation. */ -typedef uint64_t le64; -typedef uint32_t le32; -typedef uint16_t le16; +typedef leint64_t le64; +typedef leint32_t le32; +typedef leint16_t le16; +#endif #endif /* CCAN_SHORT_TYPES_H */