aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-07-18 15:58:52 +0100
committerRon Yorston <rmy@pobox.com>2017-07-18 15:58:52 +0100
commitb680f05ad449505e3d914bebd4c8d83bf768c094 (patch)
treec08ded13d430b0e7e0104f2eb594fad190ce98a3 /include/platform.h
parent258200ff81d5a9da54dab35acf36213eff1e399b (diff)
parent513a2457b65894b10b9fd6aa8753fca59eced08c (diff)
downloadbusybox-w32-b680f05ad449505e3d914bebd4c8d83bf768c094.tar.gz
busybox-w32-b680f05ad449505e3d914bebd4c8d83bf768c094.tar.bz2
busybox-w32-b680f05ad449505e3d914bebd4c8d83bf768c094.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index 13f818202..5ae82427a 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -264,6 +264,12 @@ typedef uint64_t bb__aliased_uint64_t FIX_ALIASING;
264} while (0) 264} while (0)
265#endif 265#endif
266 266
267/* Unaligned, fixed-endian accessors */
268#define get_unaligned_le32(buf) ({ uint32_t v; move_from_unaligned32(v, buf); SWAP_LE32(v); })
269#define get_unaligned_be32(buf) ({ uint32_t v; move_from_unaligned32(v, buf); SWAP_BE32(v); })
270#define put_unaligned_le32(val, buf) move_to_unaligned32(buf, SWAP_LE32(val))
271#define put_unaligned_be32(val, buf) move_to_unaligned32(buf, SWAP_BE32(val))
272
267 273
268/* ---- Size-saving "small" ints (arch-dependent) ----------- */ 274/* ---- Size-saving "small" ints (arch-dependent) ----------- */
269 275