diff options
-rw-r--r-- | libc/string/generic/memcmp.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/libc/string/generic/memcmp.c b/libc/string/generic/memcmp.c index fc63a2eae..27db6b3d3 100644 --- a/libc/string/generic/memcmp.c +++ b/libc/string/generic/memcmp.c @@ -26,10 +26,6 @@ #include <endian.h> #if __BYTE_ORDER == __BIG_ENDIAN -# define WORDS_BIGENDIAN -#endif - -#ifdef WORDS_BIGENDIAN # define CMP_LT_OR_GT(a, b) ((a) > (b) ? 1 : -1) #else # define CMP_LT_OR_GT(a, b) memcmp_bytes ((a), (b)) @@ -48,17 +44,12 @@ 3. Compare the few remaining bytes. */ -#ifndef WORDS_BIGENDIAN +#if __BYTE_ORDER != __BIG_ENDIAN /* memcmp_bytes -- Compare A and B bytewise in the byte order of the machine. A and B are known to be different. This is needed only on little-endian machines. */ -static int memcmp_bytes __P((op_t, op_t)); - -# ifdef __GNUC__ -__inline -# endif -static int +static __inline__ int memcmp_bytes (op_t a, op_t b) { long int srcp1 = (long int) &a; @@ -77,8 +68,6 @@ memcmp_bytes (op_t a, op_t b) } #endif -static int memcmp_common_alignment __P((long, long, size_t)); - /* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t' objects (not LEN bytes!). Both SRCP1 and SRCP2 should be aligned for memory operations on `op_t's. */ @@ -161,8 +150,6 @@ memcmp_common_alignment (long int srcp1, long int srcp2, size_t len) return 0; } -static int memcmp_not_common_alignment __P((long, long, size_t)); - /* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t' objects (not LEN bytes!). SRCP2 should be aligned for memory operations on `op_t', but SRCP1 *should be unaligned*. */ |