From e88276fdec7b3b94ec939f5eb1c8def004ee3878 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 1 Jun 2022 12:36:34 +0000 Subject: Rework endianness conversion primitives Signed-off-by: Laurent Bercot --- src/headers/bits-bendian | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/headers/bits-bendian') diff --git a/src/headers/bits-bendian b/src/headers/bits-bendian index 6caf1e7..ac1169f 100644 --- a/src/headers/bits-bendian +++ b/src/headers/bits-bendian @@ -1,6 +1,8 @@ -#define uint@BITS@_little_endian(s, n) uint@BITS@_reverse((s), (n)) -#define uint@BITS@_big_endian(s, n) - #define uint@BITS@_little(u) uint@BITS@_bswap(u) #define uint@BITS@_big(u) (u) +#define uint@BITS@_littlep(u) uint@BITS@_bswapp(u) +#define uint@BITS@_bigp(u) + +#define uint@BITS@_littlen(array, n) uint@BITS@_bswapn(array, n) +#define uint@BITS@_bign(array, n) -- cgit v1.2.3