From ed43f89923b313461186183d3c08e2c5a4f06c1e Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Mon, 14 Oct 2019 16:19:04 +0300 Subject: [PATCH] Use system-defined bswap macros where available JSLinux headers have them, and ours caused a name conflict. --- c/flisp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/c/flisp.c b/c/flisp.c index 4278d5e..7ed1eca 100644 --- a/c/flisp.c +++ b/c/flisp.c @@ -956,8 +956,11 @@ no_kw: return nargs; } +#ifndef bswap_16 #define bswap_16(x) (((x)&0x00ff) << 8 | ((x)&0xff00) >> 8) +#endif +#ifndef bswap_32 #ifdef __INTEL_COMPILER #define bswap_32(x) _bswap(x) #else @@ -965,6 +968,7 @@ no_kw: ((((x)&0xff000000) >> 24) | (((x)&0x00ff0000) >> 8) | \ (((x)&0x0000ff00) << 8) | (((x)&0x000000ff) << 24)) #endif +#endif #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #define GET_INT32(a) \