diff options
author | Dylan Baker <[email protected]> | 2018-09-06 15:13:22 -0700 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-11-05 16:39:55 +0000 |
commit | f9f60da813e69aacf541d25a24622c896f15ba98 (patch) | |
tree | ce1ba60e57b85a9ea16cfe12efcf3e1ab994d596 /src/util/u_math.h | |
parent | 37e54736a7bab3397e316ae4493c2e3d4aebfa5e (diff) |
util/u_endian: set PIPE_ARCH_*_ENDIAN to 1
This will allow it to be used as a drop in replacement for
_mesa_little_endian in a number of cases.
v2: - Always define PIPE_ARCH_LITTLE_ENDIAN and PIPE_ARCH_BIG_ENDIAN,
define the one that reflects the host system to 1 and the other to 0
- replace all uses of #ifdef, #ifndef, and #if defined() with #if
and #if ! with PIPE_ARCH_*_ENDIAN
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/util/u_math.h')
-rw-r--r-- | src/util/u_math.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/u_math.h b/src/util/u_math.h index 7b779c79ca7..4c3aafe80ab 100644 --- a/src/util/u_math.h +++ b/src/util/u_math.h @@ -569,7 +569,7 @@ util_bitreverse(unsigned n) * Convert from little endian to CPU byte order. */ -#ifdef PIPE_ARCH_BIG_ENDIAN +#if PIPE_ARCH_BIG_ENDIAN #define util_le64_to_cpu(x) util_bswap64(x) #define util_le32_to_cpu(x) util_bswap32(x) #define util_le16_to_cpu(x) util_bswap16(x) @@ -627,7 +627,7 @@ util_bswap16(uint16_t n) static inline void* util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t n) { -#ifdef PIPE_ARCH_BIG_ENDIAN +#if PIPE_ARCH_BIG_ENDIAN size_t i, e; assert(n % 4 == 0); |