Displaying 1 result from an estimated 1 matches for "le32_t".
Did you mean:
le32
2006 Jun 02
1
Compilation on PPC/bigendian machine
...((const uint8_t *)_p)[1] << 8;
return _v;
}
static inline void
write16(le16_t *_p, uint16_t _v)
{
- _p[0] = _v & 0xFF;
- _p[1] = (_v >> 8) & 0xFF;
+ ((uint8_t *)_p)[0] = _v & 0xFF;
+ ((uint8_t *)_p)[1] = (_v >> 8) & 0xFF;
}
static inline unsigned int
read32(le32_t *_p)
{
- _v = _p[0];
- _v |= _p[1] << 8;
- _v |= _p[2] << 16;
- _v |= _p[3] << 24;
+ uint32_t _v;
+
+ _v = ((const uint8_t *)_p)[0];
+ _v |= ((const uint8_t *)_p)[1] << 8;
+ _v |= ((const uint8_t *)_p)[2] << 16;
+ _v |= ((const uint8_t *)_p)[3] << 24;...