We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2bfd1e commit 3d6fb00Copy full SHA for 3d6fb00
arcompact/arcompact.cpp
@@ -1,4 +1,11 @@
1
+#if HAVE_BYTESWAP_H
2
#include <byteswap.h>
3
+#else
4
+#define bswap_16(value) ((((value) & 0xff) << 8) | ((value) >> 8))
5
+#define bswap_32(value) (((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | (uint32_t)bswap_16((uint16_t)((value) >> 16)))
6
+#define bswap_64(value) (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) << 32) | (uint64_t)bswap_32((uint32_t)((value) >> 32)))
7
+#endif
8
+
9
#include <cstdint>
10
#include <stdlib.h>
11
#include <stdio.h>
@@ -1995,4 +2002,4 @@ namespace ArCompact {
1995
2002
1996
2003
return result;
1997
2004
}
1998
-}
2005
+}
0 commit comments