[RFC-PATCH] x86: really use __builtin_memcmp on x86_32
From: Harvey Harrison
Date: Mon Nov 10 2008 - 01:12:42 EST
Impact: prevent generic code from overriding __builtin_memcmp
lib/string.c was using a generic implementation of memcmp
because __HAVE_ARCH_MEMCMP was not defined and it was then doing
#undef memcmp and defining a generic version.
Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx>
---
arch/x86/include/asm/string_32.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/string_32.h b/arch/x86/include/asm/string_32.h
index c86f452..b671baf 100644
--- a/arch/x86/include/asm/string_32.h
+++ b/arch/x86/include/asm/string_32.h
@@ -195,6 +195,7 @@ static inline void *__memcpy3d(void *to, const void *from, size_t len)
#define __HAVE_ARCH_MEMMOVE
void *memmove(void *dest, const void *src, size_t n);
+#define __HAVE_ARCH_MEMCMP
#define memcmp __builtin_memcmp
#define __HAVE_ARCH_MEMCHR
--
1.6.0.3.866.gc189b
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/