lkml.org 
[lkml]   [2008]   [Nov]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[RFC-PATCH] x86: really use __builtin_memcmp on x86_32
FromHarvey Harrison <>
DateSun, 09 Nov 2008 22:12:23 -0800
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@gmail.com>
---
 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




\
 
 \ /
  Last update: 2008-11-10 07:15    [from the cache]
©2003-2008