]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include/byteorder.h: add _le signed types
authorSamuel Just <sjust@redhat.com>
Thu, 21 May 2020 21:47:15 +0000 (14:47 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 2 Jun 2020 23:56:41 +0000 (16:56 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/include/byteorder.h

index 03e30f84fc7d6eb57475ffc1d5901f53320242c3..4062c2d4c2e9301deb601c24080b2b33f55c7ceb 100644 (file)
@@ -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;
+}