diff options
author | Dylan Baker <[email protected]> | 2018-11-09 16:23:08 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-11-05 16:39:55 +0000 |
commit | ee4f1bc187536d32c30f4505247750754e27f6e4 (patch) | |
tree | e389172df07d3e9ea6f7228ded7e9abbc4a2a105 /src/util | |
parent | 6b6897a9f9bdf813709a223e31e1eb5a6563686b (diff) |
util: rename PIPE_ARCH_*_ENDIAN to UTIL_ARCH_*_ENDIAN
As requested by Tim.
This was generated with:
grep 'PIPE_ARCH_.*_ENDIAN' -rIl | xargs sed -ie 's@PIPE_ARCH_\(.*\)_ENDIAN@UTIL_ARCH_\1_ENDIAN@'g
v2: - add this patch
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/sha1/sha1.c | 2 | ||||
-rw-r--r-- | src/util/u_endian.h | 36 | ||||
-rw-r--r-- | src/util/u_math.h | 6 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/util/sha1/sha1.c b/src/util/sha1/sha1.c index 78b3da31d0e..4fe2aa723c5 100644 --- a/src/util/sha1/sha1.c +++ b/src/util/sha1/sha1.c @@ -25,7 +25,7 @@ * blk0() and blk() perform the initial expand. * I got the idea of expanding during the round function from SSLeay */ -#if PIPE_ARCH_LITTLE_ENDIAN +#if UTIL_ARCH_LITTLE_ENDIAN # define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ |(rol(block->l[i],8)&0x00FF00FF)) #else diff --git a/src/util/u_endian.h b/src/util/u_endian.h index 07f8d8cfc85..4e4ba60ca1d 100644 --- a/src/util/u_endian.h +++ b/src/util/u_endian.h @@ -31,33 +31,33 @@ #include <endian.h> #if __BYTE_ORDER == __LITTLE_ENDIAN -# define PIPE_ARCH_LITTLE_ENDIAN 1 -# define PIPE_ARCH_BIG_ENDIAN 0 +# define UTIL_ARCH_LITTLE_ENDIAN 1 +# define UTIL_ARCH_BIG_ENDIAN 0 #elif __BYTE_ORDER == __BIG_ENDIAN -# define PIPE_ARCH_LITTLE_ENDIAN 0 -# define PIPE_ARCH_BIG_ENDIAN 1 +# define UTIL_ARCH_LITTLE_ENDIAN 0 +# define UTIL_ARCH_BIG_ENDIAN 1 #endif #elif defined(__APPLE__) #include <machine/endian.h> #if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN -# define PIPE_ARCH_LITTLE_ENDIAN 1 -# define PIPE_ARCH_BIG_ENDIAN 0 +# define UTIL_ARCH_LITTLE_ENDIAN 1 +# define UTIL_ARCH_BIG_ENDIAN 0 #elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN -# define PIPE_ARCH_LITTLE_ENDIAN 0 -# define PIPE_ARCH_BIG_ENDIAN 1 +# define UTIL_ARCH_LITTLE_ENDIAN 0 +# define UTIL_ARCH_BIG_ENDIAN 1 #endif #elif defined(__sun) #include <sys/isa_defs.h> #if defined(_LITTLE_ENDIAN) -# define PIPE_ARCH_LITTLE_ENDIAN 1 -# define PIPE_ARCH_BIG_ENDIAN 0 +# define UTIL_ARCH_LITTLE_ENDIAN 1 +# define UTIL_ARCH_BIG_ENDIAN 0 #elif defined(_BIG_ENDIAN) -# define PIPE_ARCH_LITTLE_ENDIAN 0 -# define PIPE_ARCH_BIG_ENDIAN 1 +# define UTIL_ARCH_LITTLE_ENDIAN 0 +# define UTIL_ARCH_BIG_ENDIAN 1 #endif #elif defined(__OpenBSD__) || defined(__NetBSD__) || \ @@ -66,17 +66,17 @@ #include <machine/endian.h> #if _BYTE_ORDER == _LITTLE_ENDIAN -# define PIPE_ARCH_LITTLE_ENDIAN 1 -# define PIPE_ARCH_BIG_ENDIAN 0 +# define UTIL_ARCH_LITTLE_ENDIAN 1 +# define UTIL_ARCH_BIG_ENDIAN 0 #elif _BYTE_ORDER == _BIG_ENDIAN -# define PIPE_ARCH_LITTLE_ENDIAN 0 -# define PIPE_ARCH_BIG_ENDIAN 1 +# define UTIL_ARCH_LITTLE_ENDIAN 0 +# define UTIL_ARCH_BIG_ENDIAN 1 #endif #elif defined(_WIN32) -#define PIPE_ARCH_LITTLE_ENDIAN 1 -#define PIPE_ARCH_BIG_ENDIAN 0 +#define UTIL_ARCH_LITTLE_ENDIAN 1 +#define UTIL_ARCH_BIG_ENDIAN 0 #endif diff --git a/src/util/u_math.h b/src/util/u_math.h index 4c3aafe80ab..4f2658e2897 100644 --- a/src/util/u_math.h +++ b/src/util/u_math.h @@ -45,7 +45,7 @@ #include <stdarg.h> #include "bitscan.h" -#include "u_endian.h" /* for PIPE_ARCH_BIG_ENDIAN */ +#include "u_endian.h" /* for UTIL_ARCH_BIG_ENDIAN */ #ifdef __cplusplus extern "C" { @@ -569,7 +569,7 @@ util_bitreverse(unsigned n) * Convert from little endian to CPU byte order. */ -#if PIPE_ARCH_BIG_ENDIAN +#if UTIL_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) { -#if PIPE_ARCH_BIG_ENDIAN +#if UTIL_ARCH_BIG_ENDIAN size_t i, e; assert(n % 4 == 0); |