From: Samuel Just Date: Thu, 21 May 2020 21:47:15 +0000 (-0700) Subject: include/byteorder.h: add _le signed types X-Git-Tag: v16.1.0~2167^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=19a6502ce8870f2134a86781f04ec099383b4296;p=ceph.git include/byteorder.h: add _le signed types Signed-off-by: Samuel Just --- 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; +}