From: Dale Weiler Date: Fri, 9 May 2014 06:39:25 +0000 (-0400) Subject: On platforms that the byte order check fails on the runtime test is concluded instead... X-Git-Tag: xonotic-v0.8.0^0 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=commitdiff_plain;h=a371c4ee273d1d7f78dff7ae15c778176a7bd980 On platforms that the byte order check fails on the runtime test is concluded instead. It still needs these swap functions at compile time since the runtime test has to run. This fixes a FTBFS on BE selected ARMs. --- diff --git a/util.c b/util.c index 8a0758e..b1d5c5b 100644 --- a/util.c +++ b/util.c @@ -58,7 +58,7 @@ const char *util_instr_str[VINSTR_END] = { * only required if big endian .. otherwise no need to swap * data. */ -#if PLATFORM_BYTE_ORDER == GMQCC_BYTE_ORDER_BIG +#if PLATFORM_BYTE_ORDER == GMQCC_BYTE_ORDER_BIG || PLATFORM_BYTE_ORDER == -1 static GMQCC_INLINE void util_swap16(uint16_t *d, size_t l) { while (l--) { d[l] = (d[l] << 8) | (d[l] >> 8);