SILC_GET32_LSB
NAME
#define SILC_GET32_LSB ...
DESCRIPTION
Return four 8-bit bytes, least significant bytes first.
SOURCE
#if defined(SILC_I486) && defined(__GNUC__)
#define SILC_GET32_LSB(l, cp) (l) = (*(SilcUInt32 *)(cp))
#else
#define SILC_GET32_LSB(l, cp) \
do { \
(l) = ((SilcUInt32)(SilcUInt8)(cp)[0]) \
| ((SilcUInt32)(SilcUInt8)(cp)[1] << 8) \
| ((SilcUInt32)(SilcUInt8)(cp)[2] << 16) \
| ((SilcUInt32)(SilcUInt8)(cp)[3] << 24); \
} while(0)
#endif /* SILC_I486 && __GNUC__ */
/* Same as upper but XOR the result always. Special purpose macro. */
#if defined(SILC_I486) && defined(__GNUC__)
#define SILC_GET32_X_LSB(l, cp) (l) ^= (*(SilcUInt32 *)(cp))
#else
#define SILC_GET32_X_LSB(l, cp) \
(l) ^= ((SilcUInt32)(SilcUInt8)(cp)[0]) \
| ((SilcUInt32)(SilcUInt8)(cp)[1] << 8) \
| ((SilcUInt32)(SilcUInt8)(cp)[2] << 16) \
| ((SilcUInt32)(SilcUInt8)(cp)[3] << 24)
#endif /* SILC_I486 && __GNUC__ */
|