summaryrefslogtreecommitdiff
path: root/src/headers/bits-lendian
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2022-06-01 12:36:34 +0000
committerLaurent Bercot <ska@appnovation.com>2022-06-01 12:36:34 +0000
commite88276fdec7b3b94ec939f5eb1c8def004ee3878 (patch)
tree118f28d54fe208fe823e5e4cc775bbf377ea53a4 /src/headers/bits-lendian
parent37b42c179bb00d05cb47c739cb95283548f84fb2 (diff)
downloadskalibs-e88276fdec7b3b94ec939f5eb1c8def004ee3878.tar.xz
Rework endianness conversion primitives
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/headers/bits-lendian')
-rw-r--r--src/headers/bits-lendian9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/headers/bits-lendian b/src/headers/bits-lendian
index 7528d46..e2358d3 100644
--- a/src/headers/bits-lendian
+++ b/src/headers/bits-lendian
@@ -1,6 +1,9 @@
-#define uint@BITS@_little_endian(s, n)
-#define uint@BITS@_big_endian(s, n) uint@BITS@_reverse((s), (n))
-
#define uint@BITS@_little(u) (u)
#define uint@BITS@_big(u) uint@BITS@_bswap(u)
+#define uint@BITS@_littlep(u)
+#define uint@BITS@_bigp(u) uint@BITS@_bswapp(u)
+
+#define uint@BITS@_littlen(array, n)
+#define uint@BITS@_bign(array, n) uint@BITS@_bswapn(array, n)
+