diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-02-02 15:08:20 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-02-02 15:08:20 +0000 |
| commit | 74ee6e70c9a4f7822e7461069579c4e6ef0a2f04 (patch) | |
| tree | 1db535ead8de13300dcceadf07278dec22fb2d02 /include/platform.h | |
| parent | e27f759c63b338e6e6cf6dc8d9d0711e9c05d6a5 (diff) | |
| parent | a2f8c89aecf473f905da6eba53d02fb23eca93cd (diff) | |
| download | busybox-w32-74ee6e70c9a4f7822e7461069579c4e6ef0a2f04.tar.gz busybox-w32-74ee6e70c9a4f7822e7461069579c4e6ef0a2f04.tar.bz2 busybox-w32-74ee6e70c9a4f7822e7461069579c4e6ef0a2f04.zip | |
Merge branch 'busybox' into mergemerge
Diffstat (limited to 'include/platform.h')
| -rw-r--r-- | include/platform.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h index 793639f1c..f46569f0f 100644 --- a/include/platform.h +++ b/include/platform.h | |||
| @@ -232,6 +232,7 @@ | |||
| 232 | # define IF_LITTLE_ENDIAN(...) | 232 | # define IF_LITTLE_ENDIAN(...) |
| 233 | /* How do bytes a,b,c,d (sequential in memory) look if fetched into uint32_t? */ | 233 | /* How do bytes a,b,c,d (sequential in memory) look if fetched into uint32_t? */ |
| 234 | # define PACK32_BYTES(a,b,c,d) (uint32_t)((d)+((c)<<8)+((b)<<16)+((a)<<24)) | 234 | # define PACK32_BYTES(a,b,c,d) (uint32_t)((d)+((c)<<8)+((b)<<16)+((a)<<24)) |
| 235 | # define PACK64_LITERAL_STR(s) (((uint64_t)PACK32_BYTES((s)[0],(s)[1],(s)[2],(s)[3])<<32) + PACK32_BYTES((s)[4],(s)[5],(s)[6],(s)[7])) | ||
| 235 | #else | 236 | #else |
| 236 | # define SWAP_BE16(x) bswap_16(x) | 237 | # define SWAP_BE16(x) bswap_16(x) |
| 237 | # define SWAP_BE32(x) bswap_32(x) | 238 | # define SWAP_BE32(x) bswap_32(x) |
| @@ -242,6 +243,7 @@ | |||
| 242 | # define IF_BIG_ENDIAN(...) | 243 | # define IF_BIG_ENDIAN(...) |
| 243 | # define IF_LITTLE_ENDIAN(...) __VA_ARGS__ | 244 | # define IF_LITTLE_ENDIAN(...) __VA_ARGS__ |
| 244 | # define PACK32_BYTES(a,b,c,d) (uint32_t)((a)+((b)<<8)+((c)<<16)+((d)<<24)) | 245 | # define PACK32_BYTES(a,b,c,d) (uint32_t)((a)+((b)<<8)+((c)<<16)+((d)<<24)) |
| 246 | # define PACK64_LITERAL_STR(s) (((uint64_t)PACK32_BYTES((s)[4],(s)[5],(s)[6],(s)[7])<<32) + PACK32_BYTES((s)[0],(s)[1],(s)[2],(s)[3])) | ||
| 245 | #endif | 247 | #endif |
| 246 | 248 | ||
| 247 | 249 | ||
