From 19a6502ce8870f2134a86781f04ec099383b4296 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 21 May 2020 14:47:15 -0700 Subject: [PATCH] include/byteorder.h: add _le signed types Signed-off-by: Samuel Just --- src/include/byteorder.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/include/byteorder.h b/src/include/byteorder.h index 03e30f84fc7..4062c2d4c2e 100644 --- a/src/include/byteorder.h +++ b/src/include/byteorder.h @@ -83,6 +83,10 @@ using ceph_le64 = ceph_le<__u64>; using ceph_le32 = ceph_le<__u32>; using ceph_le16 = ceph_le<__u16>; +using ceph_les64 = ceph_le<__s64>; +using ceph_les32 = ceph_le<__s32>; +using ceph_les16 = ceph_le<__s16>; + inline ceph_le64 init_le64(__u64 x) { ceph_le64 v; v = x; @@ -99,3 +103,18 @@ inline ceph_le16 init_le16(__u16 x) { return v; } +inline ceph_les64 init_les64(__s64 x) { + ceph_les64 v; + v = x; + return v; +} +inline ceph_les32 init_les32(__s32 x) { + ceph_les32 v; + v = x; + return v; +} +inline ceph_les16 init_les16(__s16 x) { + ceph_les16 v; + v = x; + return v; +} -- 2.39.5