diff --git a/include/ntfs-3g/endians.h b/include/ntfs-3g/endians.h index 0604867b..f7eb6c4f 100644 --- a/include/ntfs-3g/endians.h +++ b/include/ntfs-3g/endians.h @@ -272,6 +272,14 @@ #define const_cpu_to_le32(x) __constant_cpu_to_le32(x) #define const_cpu_to_le64(x) __constant_cpu_to_le64(x) +#define const_sle16_to_cpu(x) __constant_le16_to_cpu((le16) x) +#define const_sle32_to_cpu(x) __constant_le32_to_cpu((le32) x) +#define const_sle64_to_cpu(x) __constant_le64_to_cpu((le64) x) + +#define const_cpu_to_sle16(x) __constant_cpu_to_le16((u16) x) +#define const_cpu_to_sle32(x) __constant_cpu_to_le32((u32) x) +#define const_cpu_to_sle64(x) __constant_cpu_to_le64((u64) x) + #define const_be16_to_cpu(x) __constant_be16_to_cpu(x) #define const_be32_to_cpu(x) __constant_be32_to_cpu(x) #define const_be64_to_cpu(x) __constant_be64_to_cpu(x) @@ -280,4 +288,12 @@ #define const_cpu_to_be32(x) __constant_cpu_to_be32(x) #define const_cpu_to_be64(x) __constant_cpu_to_be64(x) +#define const_sbe16_to_cpu(x) __constant_be16_to_cpu((be16) x) +#define const_sbe32_to_cpu(x) __constant_be32_to_cpu((be32) x) +#define const_sbe64_to_cpu(x) __constant_be64_to_cpu((be64) x) + +#define const_cpu_to_sbe16(x) __constant_cpu_to_be16((u16) x) +#define const_cpu_to_sbe32(x) __constant_cpu_to_be32((u32) x) +#define const_cpu_to_sbe64(x) __constant_cpu_to_be64((u64) x) + #endif /* defined _NTFS_ENDIANS_H */