diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/platform.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h index e10c5b558..a5b61757f 100644 --- a/include/platform.h +++ b/include/platform.h | |||
| @@ -209,6 +209,8 @@ | |||
| 209 | # define SWAP_LE64(x) bb_bswap_64(x) | 209 | # define SWAP_LE64(x) bb_bswap_64(x) |
| 210 | # define IF_BIG_ENDIAN(...) __VA_ARGS__ | 210 | # define IF_BIG_ENDIAN(...) __VA_ARGS__ |
| 211 | # define IF_LITTLE_ENDIAN(...) | 211 | # define IF_LITTLE_ENDIAN(...) |
| 212 | /* How do bytes a,b,c,d (sequential in memory) look if fetched into uint32_t? */ | ||
| 213 | # define PACK32_BYTES(a,b,c,d) (uint32_t)((d)+((c)<<8)+((b)<<16)+((a)<<24)) | ||
| 212 | #else | 214 | #else |
| 213 | # define SWAP_BE16(x) bswap_16(x) | 215 | # define SWAP_BE16(x) bswap_16(x) |
| 214 | # define SWAP_BE32(x) bswap_32(x) | 216 | # define SWAP_BE32(x) bswap_32(x) |
| @@ -218,6 +220,7 @@ | |||
| 218 | # define SWAP_LE64(x) (x) | 220 | # define SWAP_LE64(x) (x) |
| 219 | # define IF_BIG_ENDIAN(...) | 221 | # define IF_BIG_ENDIAN(...) |
| 220 | # define IF_LITTLE_ENDIAN(...) __VA_ARGS__ | 222 | # define IF_LITTLE_ENDIAN(...) __VA_ARGS__ |
| 223 | # define PACK32_BYTES(a,b,c,d) (uint32_t)((a)+((b)<<8)+((c)<<16)+((d)<<24)) | ||
| 221 | #endif | 224 | #endif |
| 222 | 225 | ||
| 223 | 226 | ||
