template<typename T>
struct ExtType<T, std::enable_if_t<std::is_same_v<T, int16_t> ||
std::is_same_v<T, uint16_t>>> {
- using type = __le16;
+ using type = ceph_le16;
};
template<typename T>
struct ExtType<T, std::enable_if_t<std::is_same_v<T, int32_t> ||
std::is_same_v<T, uint32_t>>> {
- using type = __le32;
+ using type = ceph_le32;
};
template<typename T>
struct ExtType<T, std::enable_if_t<std::is_same_v<T, int64_t> ||
std::is_same_v<T, uint64_t>>> {
- using type = __le64;
+ using type = ceph_le64;
};
template<>
word |= (v << pos) & 0x7fffffff;
v >>= 31 - pos;
if (!v) {
- *(__le32*)p.get_pos_add(sizeof(uint32_t)) = word;
+ *(ceph_le32*)p.get_pos_add(sizeof(uint32_t)) = word;
return;
}
word |= 0x80000000;
- *(__le32*)p.get_pos_add(sizeof(uint32_t)) = word;
+ *(ceph_le32*)p.get_pos_add(sizeof(uint32_t)) = word;
uint8_t byte = v & 0x7f;
v >>= 7;
while (v) {
template<class It>
inline std::enable_if_t<is_const_iterator_v<It>>
denc_lba(uint64_t& v, It& p) {
- uint32_t word = *(__le32*)p.get_pos_add(sizeof(uint32_t));
+ uint32_t word = *(ceph_le32*)p.get_pos_add(sizeof(uint32_t));
int shift;
switch (word & 7) {
case 0:
__u8 *struct_compat, \
char **len_pos, \
uint32_t *start_oob_off) { \
- *(__le32*)*len_pos = p.get_pos() - *len_pos - sizeof(uint32_t) + \
+ *(ceph_le32*)*len_pos = p.get_pos() - *len_pos - sizeof(uint32_t) + \
p.get_out_of_band_offset() - *start_oob_off; \
} \
/* decode */ \